From 6f6bb083cec85ed3a43e046823c66e0f4c96335c Mon Sep 17 00:00:00 2001 From: Giles Cope Date: Tue, 7 Mar 2023 15:26:27 +0000 Subject: [PATCH 1/4] Brigehub: Add in force upgrade xcm version. (Same as assets and collectives) --- .../runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs | 1 + .../runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs | 1 + .../runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index c2e95c6ed4e..20235009772 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -128,6 +128,7 @@ impl Contains for SafeCallFilter { } match call { + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | RuntimeCall::System( frame_system::Call::set_heap_pages { .. } | frame_system::Call::set_code { .. } | diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index c7988e7d99f..99f1047339b 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -128,6 +128,7 @@ impl Contains for SafeCallFilter { } match call { + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | RuntimeCall::System( frame_system::Call::set_heap_pages { .. } | frame_system::Call::set_code { .. } | diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index 5e2511d6eb5..3067cb3f507 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -128,6 +128,7 @@ impl Contains for SafeCallFilter { } match call { + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | RuntimeCall::System( frame_system::Call::set_heap_pages { .. } | frame_system::Call::set_code { .. } | From 37e323d220f2da5f3f1d74dd07a9a47ad37a4cf2 Mon Sep 17 00:00:00 2001 From: Roman Useinov Date: Mon, 6 Mar 2023 19:41:53 +0100 Subject: [PATCH 2/4] [Fix] Allow force_xcm_version call for assets parachains (#2276) --- parachains/runtimes/assets/statemine/src/xcm_config.rs | 1 + parachains/runtimes/assets/statemint/src/xcm_config.rs | 1 + parachains/runtimes/assets/westmint/src/xcm_config.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/parachains/runtimes/assets/statemine/src/xcm_config.rs b/parachains/runtimes/assets/statemine/src/xcm_config.rs index 8d139f59a7b..6711a278509 100644 --- a/parachains/runtimes/assets/statemine/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemine/src/xcm_config.rs @@ -162,6 +162,7 @@ impl Contains for SafeCallFilter { } match call { + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | RuntimeCall::System( frame_system::Call::set_heap_pages { .. } | frame_system::Call::set_code { .. } | diff --git a/parachains/runtimes/assets/statemint/src/xcm_config.rs b/parachains/runtimes/assets/statemint/src/xcm_config.rs index d7d349d311f..0bb2c5ff5a7 100644 --- a/parachains/runtimes/assets/statemint/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemint/src/xcm_config.rs @@ -162,6 +162,7 @@ impl Contains for SafeCallFilter { } match call { + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | RuntimeCall::System( frame_system::Call::set_heap_pages { .. } | frame_system::Call::set_code { .. } | diff --git a/parachains/runtimes/assets/westmint/src/xcm_config.rs b/parachains/runtimes/assets/westmint/src/xcm_config.rs index d21389fc40e..0252e2183f8 100644 --- a/parachains/runtimes/assets/westmint/src/xcm_config.rs +++ b/parachains/runtimes/assets/westmint/src/xcm_config.rs @@ -157,6 +157,7 @@ impl Contains for SafeCallFilter { } match call { + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | RuntimeCall::System( frame_system::Call::set_heap_pages { .. } | frame_system::Call::set_code { .. } | From 36ae3a9c0ff9002448c26592497e9acb6ed18085 Mon Sep 17 00:00:00 2001 From: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Date: Tue, 7 Mar 2023 13:30:09 +0100 Subject: [PATCH 3/4] add force_xcm_version to safe calls (#2284) --- .../runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs | 1 + .../runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs | 1 + .../runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs | 1 + .../runtimes/collectives/collectives-polkadot/src/xcm_config.rs | 1 + 4 files changed, 4 insertions(+) diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 20235009772..ee066680318 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -145,6 +145,7 @@ impl Contains for SafeCallFilter { pallet_collator_selection::Call::leave_intent { .. }, ) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | RuntimeCall::XcmpQueue(..) | RuntimeCall::DmpQueue(..) | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) => true, diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 99f1047339b..b88a65174b3 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -145,6 +145,7 @@ impl Contains for SafeCallFilter { pallet_collator_selection::Call::leave_intent { .. }, ) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | RuntimeCall::XcmpQueue(..) | RuntimeCall::DmpQueue(..) | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) => true, diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index 3067cb3f507..84e6561a151 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -145,6 +145,7 @@ impl Contains for SafeCallFilter { pallet_collator_selection::Call::leave_intent { .. }, ) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | RuntimeCall::XcmpQueue(..) | RuntimeCall::DmpQueue(..) | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) => true, diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs index 4eb123d6802..69fe74ea412 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs @@ -151,6 +151,7 @@ impl Contains for SafeCallFilter { pallet_collator_selection::Call::leave_intent { .. }, ) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | RuntimeCall::XcmpQueue(..) | RuntimeCall::DmpQueue(..) | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) | From 4e25cdf676cdd080de05b2545355cf9ba9fed915 Mon Sep 17 00:00:00 2001 From: Giles Cope Date: Mon, 13 Mar 2023 16:20:27 +0000 Subject: [PATCH 4/4] Removing duplication --- .../runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs | 1 - .../runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs | 1 - .../runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs | 1 - .../collectives/collectives-polkadot/src/xcm_config.rs | 3 +-- 4 files changed, 1 insertion(+), 5 deletions(-) diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index ee066680318..20235009772 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -145,7 +145,6 @@ impl Contains for SafeCallFilter { pallet_collator_selection::Call::leave_intent { .. }, ) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | - RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | RuntimeCall::XcmpQueue(..) | RuntimeCall::DmpQueue(..) | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) => true, diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index b88a65174b3..99f1047339b 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -145,7 +145,6 @@ impl Contains for SafeCallFilter { pallet_collator_selection::Call::leave_intent { .. }, ) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | - RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | RuntimeCall::XcmpQueue(..) | RuntimeCall::DmpQueue(..) | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) => true, diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index 84e6561a151..3067cb3f507 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -145,7 +145,6 @@ impl Contains for SafeCallFilter { pallet_collator_selection::Call::leave_intent { .. }, ) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | - RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | RuntimeCall::XcmpQueue(..) | RuntimeCall::DmpQueue(..) | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) => true, diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs index 69fe74ea412..5c6332472aa 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs @@ -179,8 +179,7 @@ impl Contains for SafeCallFilter { pallet_collective::Call::close_old_weight { .. } | pallet_collective::Call::disapprove_proposal { .. } | pallet_collective::Call::close { .. }, - ) | - RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) => true, + ) => true, _ => false, } }