From d3508e335e27d554bf588758291b059a17a95579 Mon Sep 17 00:00:00 2001
From: "paritytech-cmd-bot-polkadot-sdk[bot]"
 <179002856+paritytech-cmd-bot-polkadot-sdk[bot]@users.noreply.github.com>
Date: Wed, 27 Nov 2024 10:23:02 +0100
Subject: [PATCH] [stable2409] Backport #6536 (#6558)

Backport #6536 into `stable2409` from bkontur.

See the
[documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md)
on how to use this bot.

<!--
  # To be used by other automation, do not modify:
  original-pr-number: #${pull_number}
-->

---------

Co-authored-by: Branislav Kontur <bkontur@gmail.com>
---
 bridges/bin/runtime-common/src/integrity.rs   |  95 +++++++++++----
 bridges/bin/runtime-common/src/mock.rs        |   1 +
 bridges/modules/relayers/src/lib.rs           |   5 +-
 bridges/modules/relayers/src/mock.rs          |  15 +--
 .../modules/relayers/src/payment_adapter.rs   |  24 ++--
 .../tests/assets/asset-hub-rococo/src/lib.rs  |   6 +-
 .../tests/assets/asset-hub-westend/src/lib.rs |   6 +-
 .../src/bridge_to_bulletin_config.rs          |   1 -
 .../src/bridge_to_westend_config.rs           |   3 +-
 .../bridge-hub-rococo/tests/tests.rs          |  30 +++--
 .../src/bridge_to_rococo_config.rs            |   3 +-
 .../bridge-hub-westend/tests/tests.rs         |  39 +++---
 .../test-utils/src/test_cases/helpers.rs      | 112 +++++++++++-------
 .../test-utils/src/test_cases/mod.rs          |  28 +++--
 .../parachains/runtimes/test-utils/src/lib.rs |  22 ++--
 prdoc/pr_6536.prdoc                           |  24 ++++
 16 files changed, 273 insertions(+), 141 deletions(-)
 create mode 100644 prdoc/pr_6536.prdoc

diff --git a/bridges/bin/runtime-common/src/integrity.rs b/bridges/bin/runtime-common/src/integrity.rs
index 2ff6c4c9165..535f1a26e5e 100644
--- a/bridges/bin/runtime-common/src/integrity.rs
+++ b/bridges/bin/runtime-common/src/integrity.rs
@@ -89,13 +89,11 @@ macro_rules! assert_bridge_messages_pallet_types(
 
 /// Macro that combines four other macro calls - `assert_chain_types`, `assert_bridge_types`,
 /// and `assert_bridge_messages_pallet_types`. It may be used
-/// at the chain that is implementing complete standard messages bridge (i.e. with bridge GRANDPA
-/// and messages pallets deployed).
+/// at the chain that is implementing standard messages bridge with messages pallets deployed.
 #[macro_export]
 macro_rules! assert_complete_bridge_types(
 	(
 		runtime: $r:path,
-		with_bridged_chain_grandpa_instance: $gi:path,
 		with_bridged_chain_messages_instance: $mi:path,
 		this_chain: $this:path,
 		bridged_chain: $bridged:path,
@@ -186,34 +184,55 @@ where
 	);
 }
 
-/// Parameters for asserting bridge pallet names.
+/// Parameters for asserting bridge GRANDPA pallet names.
 #[derive(Debug)]
-pub struct AssertBridgePalletNames<'a> {
+struct AssertBridgeGrandpaPalletNames<'a> {
 	/// Name of the GRANDPA pallet, deployed at this chain and used to bridge with the bridged
 	/// chain.
 	pub with_bridged_chain_grandpa_pallet_name: &'a str,
-	/// Name of the messages pallet, deployed at this chain and used to bridge with the bridged
-	/// chain.
-	pub with_bridged_chain_messages_pallet_name: &'a str,
 }
 
 /// Tests that bridge pallet names used in `construct_runtime!()` macro call are matching constants
 /// from chain primitives crates.
-fn assert_bridge_pallet_names<R, GI, MI>(params: AssertBridgePalletNames)
+fn assert_bridge_grandpa_pallet_names<R, GI>(params: AssertBridgeGrandpaPalletNames)
 where
-	R: pallet_bridge_grandpa::Config<GI> + pallet_bridge_messages::Config<MI>,
+	R: pallet_bridge_grandpa::Config<GI>,
 	GI: 'static,
-	MI: 'static,
 {
 	// check that the bridge GRANDPA pallet has required name
 	assert_eq!(
-		pallet_bridge_grandpa::PalletOwner::<R, GI>::storage_value_final_key().to_vec(),
+			pallet_bridge_grandpa::PalletOwner::<R, GI>::storage_value_final_key().to_vec(),
+			bp_runtime::storage_value_key(
+				params.with_bridged_chain_grandpa_pallet_name,
+				"PalletOwner",
+			)
+			.0,
+		);
+	assert_eq!(
+		pallet_bridge_grandpa::PalletOperatingMode::<R, GI>::storage_value_final_key().to_vec(),
 		bp_runtime::storage_value_key(
 			params.with_bridged_chain_grandpa_pallet_name,
-			"PalletOwner",
-		).0,
+			"PalletOperatingMode",
+		)
+		.0,
 	);
+}
 
+/// Parameters for asserting bridge messages pallet names.
+#[derive(Debug)]
+struct AssertBridgeMessagesPalletNames<'a> {
+	/// Name of the messages pallet, deployed at this chain and used to bridge with the bridged
+	/// chain.
+	pub with_bridged_chain_messages_pallet_name: &'a str,
+}
+
+/// Tests that bridge pallet names used in `construct_runtime!()` macro call are matching constants
+/// from chain primitives crates.
+fn assert_bridge_messages_pallet_names<R, MI>(params: AssertBridgeMessagesPalletNames)
+where
+	R: pallet_bridge_messages::Config<MI>,
+	MI: 'static,
+{
 	// check that the bridge messages pallet has required name
 	assert_eq!(
 		pallet_bridge_messages::PalletOwner::<R, MI>::storage_value_final_key().to_vec(),
@@ -223,6 +242,14 @@ where
 		)
 		.0,
 	);
+	assert_eq!(
+		pallet_bridge_messages::PalletOperatingMode::<R, MI>::storage_value_final_key().to_vec(),
+		bp_runtime::storage_value_key(
+			params.with_bridged_chain_messages_pallet_name,
+			"PalletOperatingMode",
+		)
+		.0,
+	);
 }
 
 /// Parameters for asserting complete standard messages bridge.
@@ -246,9 +273,11 @@ pub fn assert_complete_with_relay_chain_bridge_constants<R, GI, MI>(
 	assert_chain_constants::<R>(params.this_chain_constants);
 	assert_bridge_grandpa_pallet_constants::<R, GI>();
 	assert_bridge_messages_pallet_constants::<R, MI>();
-	assert_bridge_pallet_names::<R, GI, MI>(AssertBridgePalletNames {
+	assert_bridge_grandpa_pallet_names::<R, GI>(AssertBridgeGrandpaPalletNames {
 		with_bridged_chain_grandpa_pallet_name:
 			<R as pallet_bridge_grandpa::Config<GI>>::BridgedChain::WITH_CHAIN_GRANDPA_PALLET_NAME,
+	});
+	assert_bridge_messages_pallet_names::<R, MI>(AssertBridgeMessagesPalletNames {
 		with_bridged_chain_messages_pallet_name:
 			<R as pallet_bridge_messages::Config<MI>>::BridgedChain::WITH_CHAIN_MESSAGES_PALLET_NAME,
 	});
@@ -256,21 +285,43 @@ pub fn assert_complete_with_relay_chain_bridge_constants<R, GI, MI>(
 
 /// All bridge-related constants tests for the complete standard parachain messages bridge
 /// (i.e. with bridge GRANDPA, parachains and messages pallets deployed).
-pub fn assert_complete_with_parachain_bridge_constants<R, GI, MI, RelayChain>(
+pub fn assert_complete_with_parachain_bridge_constants<R, PI, MI>(
 	params: AssertCompleteBridgeConstants,
 ) where
 	R: frame_system::Config
-		+ pallet_bridge_grandpa::Config<GI>
+		+ pallet_bridge_parachains::Config<PI>
 		+ pallet_bridge_messages::Config<MI>,
-	GI: 'static,
+	<R as pallet_bridge_parachains::BoundedBridgeGrandpaConfig<R::BridgesGrandpaPalletInstance>>::BridgedRelayChain: ChainWithGrandpa,
+	PI: 'static,
+	MI: 'static,
+{
+	assert_chain_constants::<R>(params.this_chain_constants);
+	assert_bridge_grandpa_pallet_constants::<R, R::BridgesGrandpaPalletInstance>();
+	assert_bridge_messages_pallet_constants::<R, MI>();
+	assert_bridge_grandpa_pallet_names::<R, R::BridgesGrandpaPalletInstance>(
+		AssertBridgeGrandpaPalletNames {
+			with_bridged_chain_grandpa_pallet_name:
+				<<R as pallet_bridge_parachains::BoundedBridgeGrandpaConfig<
+					R::BridgesGrandpaPalletInstance,
+				>>::BridgedRelayChain>::WITH_CHAIN_GRANDPA_PALLET_NAME,
+		},
+	);
+	assert_bridge_messages_pallet_names::<R, MI>(AssertBridgeMessagesPalletNames {
+		with_bridged_chain_messages_pallet_name:
+			<R as pallet_bridge_messages::Config<MI>>::BridgedChain::WITH_CHAIN_MESSAGES_PALLET_NAME,
+	});
+}
+
+/// All bridge-related constants tests for the standalone messages bridge deployment (only with
+/// messages pallets deployed).
+pub fn assert_standalone_messages_bridge_constants<R, MI>(params: AssertCompleteBridgeConstants)
+where
+	R: frame_system::Config + pallet_bridge_messages::Config<MI>,
 	MI: 'static,
-	RelayChain: ChainWithGrandpa,
 {
 	assert_chain_constants::<R>(params.this_chain_constants);
-	assert_bridge_grandpa_pallet_constants::<R, GI>();
 	assert_bridge_messages_pallet_constants::<R, MI>();
-	assert_bridge_pallet_names::<R, GI, MI>(AssertBridgePalletNames {
-		with_bridged_chain_grandpa_pallet_name: RelayChain::WITH_CHAIN_GRANDPA_PALLET_NAME,
+	assert_bridge_messages_pallet_names::<R, MI>(AssertBridgeMessagesPalletNames {
 		with_bridged_chain_messages_pallet_name:
 			<R as pallet_bridge_messages::Config<MI>>::BridgedChain::WITH_CHAIN_MESSAGES_PALLET_NAME,
 	});
diff --git a/bridges/bin/runtime-common/src/mock.rs b/bridges/bin/runtime-common/src/mock.rs
index 1d4043fc4b6..7bd6a7d3bff 100644
--- a/bridges/bin/runtime-common/src/mock.rs
+++ b/bridges/bin/runtime-common/src/mock.rs
@@ -197,6 +197,7 @@ impl pallet_bridge_messages::Config for TestRuntime {
 	type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
 		TestRuntime,
 		(),
+		(),
 		ConstU64<100_000>,
 	>;
 	type OnMessagesDelivered = ();
diff --git a/bridges/modules/relayers/src/lib.rs b/bridges/modules/relayers/src/lib.rs
index f06c2e16ac2..d1c71b6d305 100644
--- a/bridges/modules/relayers/src/lib.rs
+++ b/bridges/modules/relayers/src/lib.rs
@@ -22,8 +22,9 @@
 
 use bp_relayers::{
 	ExplicitOrAccountParams, PaymentProcedure, Registration, RelayerRewardsKeyProvider,
-	RewardsAccountParams, StakeAndSlash,
+	StakeAndSlash,
 };
+pub use bp_relayers::{RewardsAccountOwner, RewardsAccountParams};
 use bp_runtime::StorageDoubleMapKeyProvider;
 use frame_support::fail;
 use sp_arithmetic::traits::{AtLeast32BitUnsigned, Zero};
@@ -31,7 +32,7 @@ use sp_runtime::{traits::CheckedSub, Saturating};
 use sp_std::marker::PhantomData;
 
 pub use pallet::*;
-pub use payment_adapter::DeliveryConfirmationPaymentsAdapter;
+pub use payment_adapter::{DeliveryConfirmationPaymentsAdapter, PayRewardFromAccount};
 pub use stake_adapter::StakeAndSlashNamed;
 pub use weights::WeightInfo;
 pub use weights_ext::WeightInfoExt;
diff --git a/bridges/modules/relayers/src/mock.rs b/bridges/modules/relayers/src/mock.rs
index d186e968e64..7dc21324937 100644
--- a/bridges/modules/relayers/src/mock.rs
+++ b/bridges/modules/relayers/src/mock.rs
@@ -171,14 +171,14 @@ pub type TestStakeAndSlash = pallet_bridge_relayers::StakeAndSlashNamed<
 frame_support::construct_runtime! {
 	pub enum TestRuntime
 	{
-		System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
+		System: frame_system,
 		Utility: pallet_utility,
-		Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
-		TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>},
-		BridgeRelayers: pallet_bridge_relayers::{Pallet, Call, Storage, Event<T>},
-		BridgeGrandpa: pallet_bridge_grandpa::{Pallet, Call, Storage, Event<T>},
-		BridgeParachains: pallet_bridge_parachains::{Pallet, Call, Storage, Event<T>},
-		BridgeMessages: pallet_bridge_messages::{Pallet, Call, Storage, Event<T>, Config<T>},
+		Balances: pallet_balances,
+		TransactionPayment: pallet_transaction_payment,
+		BridgeRelayers: pallet_bridge_relayers,
+		BridgeGrandpa: pallet_bridge_grandpa,
+		BridgeParachains: pallet_bridge_parachains,
+		BridgeMessages: pallet_bridge_messages,
 	}
 }
 
@@ -267,6 +267,7 @@ impl pallet_bridge_messages::Config for TestRuntime {
 	type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
 		TestRuntime,
 		(),
+		(),
 		ConstU64<100_000>,
 	>;
 	type OnMessagesDelivered = ();
diff --git a/bridges/modules/relayers/src/payment_adapter.rs b/bridges/modules/relayers/src/payment_adapter.rs
index 5383cba5ecb..5af0d8f9dfb 100644
--- a/bridges/modules/relayers/src/payment_adapter.rs
+++ b/bridges/modules/relayers/src/payment_adapter.rs
@@ -22,6 +22,7 @@ use bp_messages::{
 	source_chain::{DeliveryConfirmationPayments, RelayersRewards},
 	MessageNonce,
 };
+pub use bp_relayers::PayRewardFromAccount;
 use bp_relayers::{RewardsAccountOwner, RewardsAccountParams};
 use bp_runtime::Chain;
 use frame_support::{sp_runtime::SaturatedConversion, traits::Get};
@@ -31,15 +32,16 @@ use sp_std::{collections::vec_deque::VecDeque, marker::PhantomData, ops::RangeIn
 
 /// Adapter that allows relayers pallet to be used as a delivery+dispatch payment mechanism
 /// for the messages pallet.
-pub struct DeliveryConfirmationPaymentsAdapter<T, MI, DeliveryReward>(
-	PhantomData<(T, MI, DeliveryReward)>,
+pub struct DeliveryConfirmationPaymentsAdapter<T, MI, RI, DeliveryReward>(
+	PhantomData<(T, MI, RI, DeliveryReward)>,
 );
 
-impl<T, MI, DeliveryReward> DeliveryConfirmationPayments<T::AccountId, LaneIdOf<T, MI>>
-	for DeliveryConfirmationPaymentsAdapter<T, MI, DeliveryReward>
+impl<T, MI, RI, DeliveryReward> DeliveryConfirmationPayments<T::AccountId, LaneIdOf<T, MI>>
+	for DeliveryConfirmationPaymentsAdapter<T, MI, RI, DeliveryReward>
 where
-	T: Config + pallet_bridge_messages::Config<MI, LaneId = <T as Config>::LaneId>,
+	T: Config<RI> + pallet_bridge_messages::Config<MI, LaneId = <T as Config<RI>>::LaneId>,
 	MI: 'static,
+	RI: 'static,
 	DeliveryReward: Get<T::Reward>,
 {
 	type Error = &'static str;
@@ -54,7 +56,7 @@ where
 			bp_messages::calc_relayers_rewards::<T::AccountId>(messages_relayers, received_range);
 		let rewarded_relayers = relayers_rewards.len();
 
-		register_relayers_rewards::<T>(
+		register_relayers_rewards::<T, RI>(
 			confirmation_relayer,
 			relayers_rewards,
 			RewardsAccountParams::new(
@@ -70,7 +72,7 @@ where
 }
 
 // Update rewards to given relayers, optionally rewarding confirmation relayer.
-fn register_relayers_rewards<T: Config>(
+fn register_relayers_rewards<T: Config<I>, I: 'static>(
 	confirmation_relayer: &T::AccountId,
 	relayers_rewards: RelayersRewards<T::AccountId>,
 	lane_id: RewardsAccountParams<T::LaneId>,
@@ -84,7 +86,7 @@ fn register_relayers_rewards<T: Config>(
 		let relayer_reward = T::Reward::saturated_from(messages).saturating_mul(delivery_fee);
 
 		if relayer != *confirmation_relayer {
-			Pallet::<T>::register_relayer_reward(lane_id, &relayer, relayer_reward);
+			Pallet::<T, I>::register_relayer_reward(lane_id, &relayer, relayer_reward);
 		} else {
 			confirmation_relayer_reward =
 				confirmation_relayer_reward.saturating_add(relayer_reward);
@@ -92,7 +94,7 @@ fn register_relayers_rewards<T: Config>(
 	}
 
 	// finally - pay reward to confirmation relayer
-	Pallet::<T>::register_relayer_reward(
+	Pallet::<T, I>::register_relayer_reward(
 		lane_id,
 		confirmation_relayer,
 		confirmation_relayer_reward,
@@ -115,7 +117,7 @@ mod tests {
 	#[test]
 	fn confirmation_relayer_is_rewarded_if_it_has_also_delivered_messages() {
 		run_test(|| {
-			register_relayers_rewards::<TestRuntime>(
+			register_relayers_rewards::<TestRuntime, ()>(
 				&RELAYER_2,
 				relayers_rewards(),
 				test_reward_account_param(),
@@ -136,7 +138,7 @@ mod tests {
 	#[test]
 	fn confirmation_relayer_is_not_rewarded_if_it_has_not_delivered_any_messages() {
 		run_test(|| {
-			register_relayers_rewards::<TestRuntime>(
+			register_relayers_rewards::<TestRuntime, ()>(
 				&RELAYER_3,
 				relayers_rewards(),
 				test_reward_account_param(),
diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/lib.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/lib.rs
index 706102a3067..4b907fc29de 100644
--- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/lib.rs
+++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/lib.rs
@@ -36,9 +36,9 @@ mod imports {
 	pub use asset_test_utils::xcm_helpers;
 	pub use emulated_integration_tests_common::{
 		accounts::DUMMY_EMPTY,
-		get_account_id_from_seed,
-		test_parachain_is_trusted_teleporter, test_parachain_is_trusted_teleporter_for_relay,
-		test_relay_is_trusted_teleporter, test_xcm_fee_querying_apis_work_for_asset_hub,
+		get_account_id_from_seed, test_parachain_is_trusted_teleporter,
+		test_parachain_is_trusted_teleporter_for_relay, test_relay_is_trusted_teleporter,
+		test_xcm_fee_querying_apis_work_for_asset_hub,
 		xcm_emulator::{
 			assert_expected_events, bx, Chain, Parachain as Para, RelayChain as Relay, Test,
 			TestArgs, TestContext, TestExt,
diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/lib.rs
index 2548f6a23de..d9cb28d8473 100644
--- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/lib.rs
+++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/lib.rs
@@ -33,9 +33,9 @@ mod imports {
 	pub use asset_test_utils::xcm_helpers;
 	pub use emulated_integration_tests_common::{
 		accounts::DUMMY_EMPTY,
-		get_account_id_from_seed,
-		test_parachain_is_trusted_teleporter, test_parachain_is_trusted_teleporter_for_relay,
-		test_relay_is_trusted_teleporter, test_xcm_fee_querying_apis_work_for_asset_hub,
+		get_account_id_from_seed, test_parachain_is_trusted_teleporter,
+		test_parachain_is_trusted_teleporter_for_relay, test_relay_is_trusted_teleporter,
+		test_xcm_fee_querying_apis_work_for_asset_hub,
 		xcm_emulator::{
 			assert_expected_events, bx, Chain, Parachain as Para, RelayChain as Relay, Test,
 			TestArgs, TestContext, TestExt,
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 c971fa59c68..ea927534e71 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
@@ -201,7 +201,6 @@ mod tests {
 	fn ensure_bridge_integrity() {
 		assert_complete_bridge_types!(
 			runtime: Runtime,
-			with_bridged_chain_grandpa_instance: BridgeGrandpaRococoBulletinInstance,
 			with_bridged_chain_messages_instance: WithRococoBulletinMessagesInstance,
 			this_chain: bp_bridge_hub_rococo::BridgeHubRococo,
 			bridged_chain: bp_polkadot_bulletin::PolkadotBulletin,
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 8fe04572310..eeb06d72a45 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
@@ -120,6 +120,7 @@ impl pallet_bridge_messages::Config<WithBridgeHubWestendMessagesInstance> for Ru
 	type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
 		Runtime,
 		WithBridgeHubWestendMessagesInstance,
+		RelayersForLegacyLaneIdsMessagesInstance,
 		DeliveryRewardInBalance,
 	>;
 
@@ -253,7 +254,6 @@ mod tests {
 	fn ensure_bridge_integrity() {
 		assert_complete_bridge_types!(
 			runtime: Runtime,
-			with_bridged_chain_grandpa_instance: BridgeGrandpaWestendInstance,
 			with_bridged_chain_messages_instance: WithBridgeHubWestendMessagesInstance,
 			this_chain: bp_bridge_hub_rococo::BridgeHubRococo,
 			bridged_chain: bp_bridge_hub_westend::BridgeHubWestend,
@@ -263,7 +263,6 @@ mod tests {
 			Runtime,
 			BridgeGrandpaWestendInstance,
 			WithBridgeHubWestendMessagesInstance,
-			bp_westend::Westend,
 		>(AssertCompleteBridgeConstants {
 			this_chain_constants: AssertChainConstants {
 				block_length: bp_bridge_hub_rococo::BlockLength::get(),
diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/tests/tests.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/tests/tests.rs
index 002e31174cb..ce2c0981ba8 100644
--- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/tests/tests.rs
+++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/tests/tests.rs
@@ -341,11 +341,12 @@ mod bridge_hub_westend_tests {
 				>(
 					SiblingParachainLocation::get(),
 					BridgedUniversalLocation::get(),
-					|locations, fee| {
+					false,
+					|locations, _fee| {
 						bridge_hub_test_utils::open_bridge_with_storage::<
 							Runtime,
 							XcmOverBridgeHubWestendInstance
-						>(locations, fee, LegacyLaneId([0, 0, 0, 1]))
+						>(locations, LegacyLaneId([0, 0, 0, 1]))
 					}
 				).1
 			},
@@ -405,11 +406,12 @@ mod bridge_hub_westend_tests {
 				>(
 					SiblingParachainLocation::get(),
 					BridgedUniversalLocation::get(),
-					|locations, fee| {
+					false,
+					|locations, _fee| {
 						bridge_hub_test_utils::open_bridge_with_storage::<
 							Runtime,
 							XcmOverBridgeHubWestendInstance,
-						>(locations, fee, LegacyLaneId([0, 0, 0, 1]))
+						>(locations, LegacyLaneId([0, 0, 0, 1]))
 					},
 				)
 				.1
@@ -439,11 +441,12 @@ mod bridge_hub_westend_tests {
 				>(
 					SiblingParachainLocation::get(),
 					BridgedUniversalLocation::get(),
-					|locations, fee| {
+					false,
+					|locations, _fee| {
 						bridge_hub_test_utils::open_bridge_with_storage::<
 							Runtime,
 							XcmOverBridgeHubWestendInstance,
-						>(locations, fee, LegacyLaneId([0, 0, 0, 1]))
+						>(locations, LegacyLaneId([0, 0, 0, 1]))
 					},
 				)
 				.1
@@ -605,11 +608,12 @@ mod bridge_hub_bulletin_tests {
 				>(
 					SiblingPeopleParachainLocation::get(),
 					BridgedBulletinLocation::get(),
-					|locations, fee| {
+					false,
+					|locations, _fee| {
 						bridge_hub_test_utils::open_bridge_with_storage::<
 							Runtime,
 							XcmOverPolkadotBulletinInstance
-						>(locations, fee, HashedLaneId::try_new(1, 2).unwrap())
+						>(locations, HashedLaneId::try_new(1, 2).unwrap())
 					}
 				).1
 			},
@@ -668,11 +672,12 @@ mod bridge_hub_bulletin_tests {
 				>(
 					SiblingPeopleParachainLocation::get(),
 					BridgedBulletinLocation::get(),
-					|locations, fee| {
+					false,
+					|locations, _fee| {
 						bridge_hub_test_utils::open_bridge_with_storage::<
 							Runtime,
 							XcmOverPolkadotBulletinInstance,
-						>(locations, fee, HashedLaneId::try_new(1, 2).unwrap())
+						>(locations, HashedLaneId::try_new(1, 2).unwrap())
 					},
 				)
 				.1
@@ -701,11 +706,12 @@ mod bridge_hub_bulletin_tests {
 				>(
 					SiblingPeopleParachainLocation::get(),
 					BridgedBulletinLocation::get(),
-					|locations, fee| {
+					false,
+					|locations, _fee| {
 						bridge_hub_test_utils::open_bridge_with_storage::<
 							Runtime,
 							XcmOverPolkadotBulletinInstance,
-						>(locations, fee, HashedLaneId::try_new(1, 2).unwrap())
+						>(locations, HashedLaneId::try_new(1, 2).unwrap())
 					},
 				)
 				.1
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 e45654bc62b..0a21dbe5239 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
@@ -151,6 +151,7 @@ impl pallet_bridge_messages::Config<WithBridgeHubRococoMessagesInstance> for Run
 	type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
 		Runtime,
 		WithBridgeHubRococoMessagesInstance,
+		RelayersForLegacyLaneIdsMessagesInstance,
 		DeliveryRewardInBalance,
 	>;
 
@@ -281,7 +282,6 @@ mod tests {
 	fn ensure_bridge_integrity() {
 		assert_complete_bridge_types!(
 			runtime: Runtime,
-			with_bridged_chain_grandpa_instance: BridgeGrandpaRococoInstance,
 			with_bridged_chain_messages_instance: WithBridgeHubRococoMessagesInstance,
 			this_chain: bp_bridge_hub_westend::BridgeHubWestend,
 			bridged_chain: bp_bridge_hub_rococo::BridgeHubRococo,
@@ -291,7 +291,6 @@ mod tests {
 			Runtime,
 			BridgeGrandpaRococoInstance,
 			WithBridgeHubRococoMessagesInstance,
-			bp_rococo::Rococo,
 		>(AssertCompleteBridgeConstants {
 			this_chain_constants: AssertChainConstants {
 				block_length: bp_bridge_hub_westend::BlockLength::get(),
diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/tests/tests.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/tests/tests.rs
index 4ff388f4ba2..3f2952db015 100644
--- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/tests/tests.rs
+++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/tests/tests.rs
@@ -243,10 +243,11 @@ fn handle_export_message_from_system_parachain_add_to_outbound_queue_works() {
 				>(
 					SiblingParachainLocation::get(),
 					BridgedUniversalLocation::get(),
-					|locations, fee| {
+					false,
+					|locations, _fee| {
 						bridge_hub_test_utils::open_bridge_with_storage::<
 							Runtime, XcmOverBridgeHubRococoInstance
-						>(locations, fee, LegacyLaneId([0, 0, 0, 1]))
+						>(locations, LegacyLaneId([0, 0, 0, 1]))
 					}
 				).1
 			},
@@ -301,12 +302,17 @@ fn relayed_incoming_message_works() {
 				XcmOverBridgeHubRococoInstance,
 				LocationToAccountId,
 				WestendLocation,
-			>(SiblingParachainLocation::get(), BridgedUniversalLocation::get(), |locations, fee| {
-				bridge_hub_test_utils::open_bridge_with_storage::<
-					Runtime,
-					XcmOverBridgeHubRococoInstance,
-				>(locations, fee, LegacyLaneId([0, 0, 0, 1]))
-			})
+			>(
+				SiblingParachainLocation::get(),
+				BridgedUniversalLocation::get(),
+				false,
+				|locations, _fee| {
+					bridge_hub_test_utils::open_bridge_with_storage::<
+						Runtime,
+						XcmOverBridgeHubRococoInstance,
+					>(locations, LegacyLaneId([0, 0, 0, 1]))
+				},
+			)
 			.1
 		},
 		construct_and_apply_extrinsic,
@@ -331,12 +337,17 @@ fn free_relay_extrinsic_works() {
 				XcmOverBridgeHubRococoInstance,
 				LocationToAccountId,
 				WestendLocation,
-			>(SiblingParachainLocation::get(), BridgedUniversalLocation::get(), |locations, fee| {
-				bridge_hub_test_utils::open_bridge_with_storage::<
-					Runtime,
-					XcmOverBridgeHubRococoInstance,
-				>(locations, fee, LegacyLaneId([0, 0, 0, 1]))
-			})
+			>(
+				SiblingParachainLocation::get(),
+				BridgedUniversalLocation::get(),
+				false,
+				|locations, _fee| {
+					bridge_hub_test_utils::open_bridge_with_storage::<
+						Runtime,
+						XcmOverBridgeHubRococoInstance,
+					>(locations, LegacyLaneId([0, 0, 0, 1]))
+				},
+			)
 			.1
 		},
 		construct_and_apply_extrinsic,
diff --git a/cumulus/parachains/runtimes/bridge-hubs/test-utils/src/test_cases/helpers.rs b/cumulus/parachains/runtimes/bridge-hubs/test-utils/src/test_cases/helpers.rs
index aac60bba0b5..03ddc4313b4 100644
--- a/cumulus/parachains/runtimes/bridge-hubs/test-utils/src/test_cases/helpers.rs
+++ b/cumulus/parachains/runtimes/bridge-hubs/test-utils/src/test_cases/helpers.rs
@@ -29,7 +29,7 @@ use core::marker::PhantomData;
 use frame_support::{
 	assert_ok,
 	dispatch::GetDispatchInfo,
-	traits::{fungible::Mutate, OnFinalize, OnInitialize, PalletInfoAccess},
+	traits::{fungible::Mutate, Contains, OnFinalize, OnInitialize, PalletInfoAccess},
 };
 use frame_system::pallet_prelude::BlockNumberFor;
 use pallet_bridge_grandpa::{BridgedBlockHash, BridgedHeader};
@@ -395,7 +395,7 @@ pub fn ensure_opened_bridge<
 	XcmOverBridgePalletInstance,
 	LocationToAccountId,
 	TokenLocation>
-(source: Location, destination: InteriorLocation, bridge_opener: impl Fn(BridgeLocations, Asset)) -> (BridgeLocations, pallet_xcm_bridge_hub::LaneIdOf<Runtime, XcmOverBridgePalletInstance>)
+(source: Location, destination: InteriorLocation, is_paid_xcm_execution: bool, bridge_opener: impl Fn(BridgeLocations, Option<Asset>)) -> (BridgeLocations, pallet_xcm_bridge_hub::LaneIdOf<Runtime, XcmOverBridgePalletInstance>)
 where
 	Runtime: BasicParachainRuntime + BridgeXcmOverBridgeConfig<XcmOverBridgePalletInstance>,
 	XcmOverBridgePalletInstance: 'static,
@@ -416,24 +416,37 @@ TokenLocation: Get<Location>{
 	)
 	.is_none());
 
-	// required balance: ED + fee + BridgeDeposit
-	let bridge_deposit =
-		<Runtime as pallet_xcm_bridge_hub::Config<XcmOverBridgePalletInstance>>::BridgeDeposit::get(
-		);
-	// random high enough value for `BuyExecution` fees
-	let buy_execution_fee_amount = 5_000_000_000_000_u128;
-	let buy_execution_fee = (TokenLocation::get(), buy_execution_fee_amount).into();
-	let balance_needed = <Runtime as pallet_balances::Config>::ExistentialDeposit::get() +
-		buy_execution_fee_amount.into() +
-		bridge_deposit.into();
-
 	// SA of source location needs to have some required balance
-	let source_account_id = LocationToAccountId::convert_location(&source).expect("valid location");
-	let _ = <pallet_balances::Pallet<Runtime>>::mint_into(&source_account_id, balance_needed)
-		.expect("mint_into passes");
+	if !<Runtime as pallet_xcm_bridge_hub::Config<XcmOverBridgePalletInstance>>::AllowWithoutBridgeDeposit::contains(&source) {
+		// required balance: ED + fee + BridgeDeposit
+		let bridge_deposit =
+			<Runtime as pallet_xcm_bridge_hub::Config<XcmOverBridgePalletInstance>>::BridgeDeposit::get(
+			);
+		let balance_needed = <Runtime as pallet_balances::Config>::ExistentialDeposit::get() + bridge_deposit.into();
+
+		let source_account_id = LocationToAccountId::convert_location(&source).expect("valid location");
+		let _ = <pallet_balances::Pallet<Runtime>>::mint_into(&source_account_id, balance_needed)
+			.expect("mint_into passes");
+	};
+
+	let maybe_paid_execution = if is_paid_xcm_execution {
+		// random high enough value for `BuyExecution` fees
+		let buy_execution_fee_amount = 5_000_000_000_000_u128;
+		let buy_execution_fee = (TokenLocation::get(), buy_execution_fee_amount).into();
+
+		let balance_needed = <Runtime as pallet_balances::Config>::ExistentialDeposit::get() +
+			buy_execution_fee_amount.into();
+		let source_account_id =
+			LocationToAccountId::convert_location(&source).expect("valid location");
+		let _ = <pallet_balances::Pallet<Runtime>>::mint_into(&source_account_id, balance_needed)
+			.expect("mint_into passes");
+		Some(buy_execution_fee)
+	} else {
+		None
+	};
 
 	// call the bridge opener
-	bridge_opener(*locations.clone(), buy_execution_fee);
+	bridge_opener(*locations.clone(), maybe_paid_execution);
 
 	// check opened bridge
 	let bridge = pallet_xcm_bridge_hub::Bridges::<Runtime, XcmOverBridgePalletInstance>::get(
@@ -452,8 +465,9 @@ TokenLocation: Get<Location>{
 
 /// Utility for opening bridge with dedicated `pallet_xcm_bridge_hub`'s extrinsic.
 pub fn open_bridge_with_extrinsic<Runtime, XcmOverBridgePalletInstance>(
-	locations: BridgeLocations,
-	buy_execution_fee: Asset,
+	(origin, origin_kind): (Location, OriginKind),
+	bridge_destination_universal_location: InteriorLocation,
+	maybe_paid_execution: Option<Asset>,
 ) where
 	Runtime: frame_system::Config
 		+ pallet_xcm_bridge_hub::Config<XcmOverBridgePalletInstance>
@@ -469,15 +483,15 @@ pub fn open_bridge_with_extrinsic<Runtime, XcmOverBridgePalletInstance>(
 		XcmOverBridgePalletInstance,
 	>::open_bridge {
 		bridge_destination_universal_location: Box::new(
-			locations.bridge_destination_universal_location().clone().into(),
+			bridge_destination_universal_location.clone().into(),
 		),
 	});
 
 	// execute XCM as source origin would do with `Transact -> Origin::Xcm`
-	assert_ok!(RuntimeHelper::<Runtime>::execute_as_origin_xcm(
-		locations.bridge_origin_relative_location().clone(),
+	assert_ok!(RuntimeHelper::<Runtime>::execute_as_origin(
+		(origin, origin_kind),
 		open_bridge_call,
-		buy_execution_fee
+		maybe_paid_execution
 	)
 	.ensure_complete());
 }
@@ -486,7 +500,6 @@ pub fn open_bridge_with_extrinsic<Runtime, XcmOverBridgePalletInstance>(
 /// purposes).
 pub fn open_bridge_with_storage<Runtime, XcmOverBridgePalletInstance>(
 	locations: BridgeLocations,
-	_buy_execution_fee: Asset,
 	lane_id: pallet_xcm_bridge_hub::LaneIdOf<Runtime, XcmOverBridgePalletInstance>,
 ) where
 	Runtime: pallet_xcm_bridge_hub::Config<XcmOverBridgePalletInstance>,
@@ -503,8 +516,12 @@ pub fn open_bridge_with_storage<Runtime, XcmOverBridgePalletInstance>(
 }
 
 /// Helper function to close the bridge/lane for `source` and `destination`.
-pub fn close_bridge<Runtime, XcmOverBridgePalletInstance, LocationToAccountId, TokenLocation>(source: Location, destination: InteriorLocation)
-where
+pub fn close_bridge<Runtime, XcmOverBridgePalletInstance, LocationToAccountId, TokenLocation>(
+	expected_source: Location,
+	bridge_destination_universal_location: InteriorLocation,
+	(origin, origin_kind): (Location, OriginKind),
+	is_paid_xcm_execution: bool
+) where
 	Runtime: BasicParachainRuntime + BridgeXcmOverBridgeConfig<XcmOverBridgePalletInstance>,
 	XcmOverBridgePalletInstance: 'static,
 	<Runtime as frame_system::Config>::RuntimeCall: GetDispatchInfo + From<BridgeXcmOverBridgeCall<Runtime, XcmOverBridgePalletInstance>>,
@@ -515,8 +532,8 @@ TokenLocation: Get<Location>{
 	// construct expected bridge configuration
 	let locations =
 		pallet_xcm_bridge_hub::Pallet::<Runtime, XcmOverBridgePalletInstance>::bridge_locations(
-			source.clone().into(),
-			destination.clone().into(),
+			expected_source.clone().into(),
+			bridge_destination_universal_location.clone().into(),
 		)
 		.expect("valid bridge locations");
 	assert!(pallet_xcm_bridge_hub::Bridges::<Runtime, XcmOverBridgePalletInstance>::get(
@@ -525,35 +542,38 @@ TokenLocation: Get<Location>{
 	.is_some());
 
 	// required balance: ED + fee + BridgeDeposit
-	let bridge_deposit =
-		<Runtime as pallet_xcm_bridge_hub::Config<XcmOverBridgePalletInstance>>::BridgeDeposit::get(
-		);
-	// random high enough value for `BuyExecution` fees
-	let buy_execution_fee_amount = 2_500_000_000_000_u128;
-	let buy_execution_fee = (TokenLocation::get(), buy_execution_fee_amount).into();
-	let balance_needed = <Runtime as pallet_balances::Config>::ExistentialDeposit::get() +
-		buy_execution_fee_amount.into() +
-		bridge_deposit.into();
-
-	// SA of source location needs to have some required balance
-	let source_account_id = LocationToAccountId::convert_location(&source).expect("valid location");
-	let _ = <pallet_balances::Pallet<Runtime>>::mint_into(&source_account_id, balance_needed)
-		.expect("mint_into passes");
+	let maybe_paid_execution = if is_paid_xcm_execution {
+		// random high enough value for `BuyExecution` fees
+		let buy_execution_fee_amount = 2_500_000_000_000_u128;
+		let buy_execution_fee = (TokenLocation::get(), buy_execution_fee_amount).into();
+
+		let balance_needed = <Runtime as pallet_balances::Config>::ExistentialDeposit::get() +
+			buy_execution_fee_amount.into();
+		let source_account_id =
+			LocationToAccountId::convert_location(&expected_source).expect("valid location");
+		let _ = <pallet_balances::Pallet<Runtime>>::mint_into(&source_account_id, balance_needed)
+			.expect("mint_into passes");
+		Some(buy_execution_fee)
+	} else {
+		None
+	};
 
 	// close bridge with `Transact` call
 	let close_bridge_call = RuntimeCallOf::<Runtime>::from(BridgeXcmOverBridgeCall::<
 		Runtime,
 		XcmOverBridgePalletInstance,
 	>::close_bridge {
-		bridge_destination_universal_location: Box::new(destination.into()),
+		bridge_destination_universal_location: Box::new(
+			bridge_destination_universal_location.into(),
+		),
 		may_prune_messages: 16,
 	});
 
 	// execute XCM as source origin would do with `Transact -> Origin::Xcm`
-	assert_ok!(RuntimeHelper::<Runtime>::execute_as_origin_xcm(
-		source.clone(),
+	assert_ok!(RuntimeHelper::<Runtime>::execute_as_origin(
+		(origin, origin_kind),
 		close_bridge_call,
-		buy_execution_fee
+		maybe_paid_execution
 	)
 	.ensure_complete());
 
diff --git a/cumulus/parachains/runtimes/bridge-hubs/test-utils/src/test_cases/mod.rs b/cumulus/parachains/runtimes/bridge-hubs/test-utils/src/test_cases/mod.rs
index 663558f5fd5..84d2e76d14e 100644
--- a/cumulus/parachains/runtimes/bridge-hubs/test-utils/src/test_cases/mod.rs
+++ b/cumulus/parachains/runtimes/bridge-hubs/test-utils/src/test_cases/mod.rs
@@ -659,8 +659,10 @@ where
 pub fn open_and_close_bridge_works<Runtime, XcmOverBridgePalletInstance, LocationToAccountId, TokenLocation>(
 	collator_session_key: CollatorSessionKeys<Runtime>,
 	runtime_para_id: u32,
-	source: Location,
+	expected_source: Location,
 	destination: InteriorLocation,
+	origin_with_origin_kind: (Location, OriginKind),
+	is_paid_xcm_execution: bool,
 ) where
 	Runtime: BasicParachainRuntime + BridgeXcmOverBridgeConfig<XcmOverBridgePalletInstance>,
 	XcmOverBridgePalletInstance: 'static,
@@ -674,7 +676,7 @@ pub fn open_and_close_bridge_works<Runtime, XcmOverBridgePalletInstance, Locatio
 	run_test::<Runtime, _>(collator_session_key, runtime_para_id, vec![], || {
 		// construct expected bridge configuration
 		let locations = pallet_xcm_bridge_hub::Pallet::<Runtime, XcmOverBridgePalletInstance>::bridge_locations(
-			source.clone().into(),
+			expected_source.clone().into(),
 			destination.clone().into(),
 		).expect("valid bridge locations");
 		let expected_lane_id =
@@ -709,7 +711,7 @@ pub fn open_and_close_bridge_works<Runtime, XcmOverBridgePalletInstance, Locatio
 			Err(LanesManagerError::UnknownOutboundLane)
 		);
 
-		// open bridge with Transact call from sibling
+		// open bridge with Transact call
 		assert_eq!(
 			helpers::ensure_opened_bridge::<
 				Runtime,
@@ -717,9 +719,17 @@ pub fn open_and_close_bridge_works<Runtime, XcmOverBridgePalletInstance, Locatio
 				LocationToAccountId,
 				TokenLocation,
 			>(
-				source.clone(),
+				expected_source.clone(),
 				destination.clone(),
-				open_bridge_with_extrinsic::<Runtime, XcmOverBridgePalletInstance>
+				is_paid_xcm_execution,
+				|locations, maybe_paid_execution| open_bridge_with_extrinsic::<
+					Runtime,
+					XcmOverBridgePalletInstance,
+				>(
+					origin_with_origin_kind.clone(),
+					locations.bridge_destination_universal_location().clone(),
+					maybe_paid_execution
+				)
 			)
 			.0
 			.bridge_id(),
@@ -732,7 +742,7 @@ pub fn open_and_close_bridge_works<Runtime, XcmOverBridgePalletInstance, Locatio
 				locations.bridge_id()
 			),
 			Some(Bridge {
-				bridge_origin_relative_location: Box::new(source.clone().into()),
+				bridge_origin_relative_location: Box::new(expected_source.clone().into()),
 				bridge_origin_universal_location: Box::new(
 					locations.bridge_origin_universal_location().clone().into()
 				),
@@ -740,7 +750,7 @@ pub fn open_and_close_bridge_works<Runtime, XcmOverBridgePalletInstance, Locatio
 					locations.bridge_destination_universal_location().clone().into()
 				),
 				state: BridgeState::Opened,
-				bridge_owner_account: LocationToAccountId::convert_location(&source)
+				bridge_owner_account: LocationToAccountId::convert_location(&expected_source)
 					.expect("valid location")
 					.into(),
 				deposit: expected_deposit,
@@ -756,13 +766,13 @@ pub fn open_and_close_bridge_works<Runtime, XcmOverBridgePalletInstance, Locatio
 			Ok(LaneState::Opened)
 		);
 
-		// close bridge with Transact call from sibling
+		// close bridge with Transact call
 		helpers::close_bridge::<
 			Runtime,
 			XcmOverBridgePalletInstance,
 			LocationToAccountId,
 			TokenLocation,
-		>(source.clone(), destination);
+		>(expected_source, destination, origin_with_origin_kind, is_paid_xcm_execution);
 
 		// check bridge/lane DOES not exist
 		assert_eq!(
diff --git a/cumulus/parachains/runtimes/test-utils/src/lib.rs b/cumulus/parachains/runtimes/test-utils/src/lib.rs
index 3b38eee244f..3584edad0b5 100644
--- a/cumulus/parachains/runtimes/test-utils/src/lib.rs
+++ b/cumulus/parachains/runtimes/test-utils/src/lib.rs
@@ -464,22 +464,30 @@ impl<
 		)
 	}
 
-	pub fn execute_as_origin_xcm<Call: GetDispatchInfo + Encode>(
-		origin: Location,
+	pub fn execute_as_origin<Call: GetDispatchInfo + Encode>(
+		(origin, origin_kind): (Location, OriginKind),
 		call: Call,
-		buy_execution_fee: Asset,
+		maybe_buy_execution_fee: Option<Asset>,
 	) -> Outcome {
+		let mut instructions = if let Some(buy_execution_fee) = maybe_buy_execution_fee {
+			vec![
+				WithdrawAsset(buy_execution_fee.clone().into()),
+				BuyExecution { fees: buy_execution_fee.clone(), weight_limit: Unlimited },
+			]
+		} else {
+			vec![UnpaidExecution { check_origin: None, weight_limit: Unlimited }]
+		};
+
 		// prepare `Transact` xcm
-		let xcm = Xcm(vec![
-			WithdrawAsset(buy_execution_fee.clone().into()),
-			BuyExecution { fees: buy_execution_fee.clone(), weight_limit: Unlimited },
+		instructions.extend(vec![
 			Transact {
-				origin_kind: OriginKind::Xcm,
+				origin_kind,
 				require_weight_at_most: call.get_dispatch_info().weight,
 				call: call.encode().into(),
 			},
 			ExpectTransactStatus(MaybeErrorCode::Success),
 		]);
+		let xcm = Xcm(instructions);
 
 		// execute xcm as parent origin
 		let mut hash = xcm.using_encoded(sp_io::hashing::blake2_256);
diff --git a/prdoc/pr_6536.prdoc b/prdoc/pr_6536.prdoc
new file mode 100644
index 00000000000..676b5c131f1
--- /dev/null
+++ b/prdoc/pr_6536.prdoc
@@ -0,0 +1,24 @@
+title: Bridges testing improvements
+doc:
+- audience: Runtime Dev
+  description: |-
+    This PR includes:
+    - Refactored integrity tests to support standalone deployment of `pallet-bridge-messages`.
+    - Refactored the `open_and_close_bridge_works` test case to support multiple scenarios, such as:
+      1. A local chain opening a bridge.
+      2. Sibling parachains opening a bridge.
+      3. The relay chain opening a bridge.
+    - Previously, we added instance support for `pallet-bridge-relayer` but overlooked updating the `DeliveryConfirmationPaymentsAdapter`.
+crates:
+- name: bridge-runtime-common
+  bump: patch
+- name: pallet-bridge-relayers
+  bump: patch
+- name: bridge-hub-rococo-runtime
+  bump: patch
+- name: bridge-hub-westend-runtime
+  bump: patch
+- name: bridge-hub-test-utils
+  bump: major
+- name: parachains-runtimes-test-utils
+  bump: major
-- 
GitLab