mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 22:41:06 +00:00
test runtimes: allow local origins to execute arbitrary XCMs (#3930)
We are exploring [allowing this for Kusama](https://github.com/polkadot-fellows/runtimes/pull/261) as well, disallowing on test chains seems unnecessarily limiting.
This commit is contained in:
@@ -670,11 +670,9 @@ impl pallet_xcm::Config for Runtime {
|
|||||||
// We want to disallow users sending (arbitrary) XCMs from this chain.
|
// We want to disallow users sending (arbitrary) XCMs from this chain.
|
||||||
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
|
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
|
||||||
type XcmRouter = XcmRouter;
|
type XcmRouter = XcmRouter;
|
||||||
// We support local origins dispatching XCM executions in principle...
|
// We support local origins dispatching XCM executions.
|
||||||
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
||||||
// ... but disallow generic XCM execution. As a result only teleports and reserve transfers are
|
type XcmExecuteFilter = Everything;
|
||||||
// allowed.
|
|
||||||
type XcmExecuteFilter = Nothing;
|
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type XcmTeleportFilter = Everything;
|
type XcmTeleportFilter = Everything;
|
||||||
type XcmReserveTransferFilter = Everything;
|
type XcmReserveTransferFilter = Everything;
|
||||||
|
|||||||
@@ -367,9 +367,9 @@ impl pallet_xcm::Config for Runtime {
|
|||||||
type XcmRouter = XcmRouter;
|
type XcmRouter = XcmRouter;
|
||||||
// We want to disallow users sending (arbitrary) XCMs from this chain.
|
// We want to disallow users sending (arbitrary) XCMs from this chain.
|
||||||
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
|
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
|
||||||
// We support local origins dispatching XCM executions in principle...
|
// We support local origins dispatching XCM executions.
|
||||||
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
||||||
type XcmExecuteFilter = Nothing;
|
type XcmExecuteFilter = Everything;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type XcmTeleportFilter = Everything;
|
type XcmTeleportFilter = Everything;
|
||||||
type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location.
|
type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location.
|
||||||
|
|||||||
@@ -295,9 +295,9 @@ impl pallet_xcm::Config for Runtime {
|
|||||||
type XcmRouter = XcmRouter;
|
type XcmRouter = XcmRouter;
|
||||||
// We want to disallow users sending (arbitrary) XCMs from this chain.
|
// We want to disallow users sending (arbitrary) XCMs from this chain.
|
||||||
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
|
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
|
||||||
// We support local origins dispatching XCM executions in principle...
|
// We support local origins dispatching XCM executions.
|
||||||
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
||||||
type XcmExecuteFilter = Nothing;
|
type XcmExecuteFilter = Everything;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type XcmTeleportFilter = Everything;
|
type XcmTeleportFilter = Everything;
|
||||||
type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location.
|
type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location.
|
||||||
|
|||||||
@@ -325,10 +325,9 @@ impl pallet_xcm::Config for Runtime {
|
|||||||
// We only allow the Fellows to send messages.
|
// We only allow the Fellows to send messages.
|
||||||
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, FellowsToPlurality>;
|
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, FellowsToPlurality>;
|
||||||
type XcmRouter = XcmRouter;
|
type XcmRouter = XcmRouter;
|
||||||
// We support local origins dispatching XCM executions in principle...
|
// We support local origins dispatching XCM executions.
|
||||||
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
||||||
// ... but disallow generic XCM execution. As a result only teleports are allowed.
|
type XcmExecuteFilter = Everything;
|
||||||
type XcmExecuteFilter = Nothing;
|
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type XcmTeleportFilter = Everything;
|
type XcmTeleportFilter = Everything;
|
||||||
type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location.
|
type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location.
|
||||||
|
|||||||
@@ -223,11 +223,10 @@ impl pallet_xcm::Config for Runtime {
|
|||||||
// We want to disallow users sending (arbitrary) XCMs from this chain.
|
// We want to disallow users sending (arbitrary) XCMs from this chain.
|
||||||
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
|
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
|
||||||
type XcmRouter = XcmRouter;
|
type XcmRouter = XcmRouter;
|
||||||
// We support local origins dispatching XCM executions in principle...
|
// We support local origins dispatching XCM executions.
|
||||||
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
||||||
// ... but disallow generic XCM execution. As a result only teleports and reserve transfers are
|
|
||||||
// allowed.
|
// allowed.
|
||||||
type XcmExecuteFilter = Nothing;
|
type XcmExecuteFilter = Everything;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type XcmTeleportFilter = Everything;
|
type XcmTeleportFilter = Everything;
|
||||||
type XcmReserveTransferFilter = Everything;
|
type XcmReserveTransferFilter = Everything;
|
||||||
|
|||||||
@@ -288,10 +288,9 @@ impl pallet_xcm::Config for Runtime {
|
|||||||
// We want to disallow users sending (arbitrary) XCM programs from this chain.
|
// We want to disallow users sending (arbitrary) XCM programs from this chain.
|
||||||
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
|
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
|
||||||
type XcmRouter = XcmRouter;
|
type XcmRouter = XcmRouter;
|
||||||
// We support local origins dispatching XCM executions in principle...
|
// We support local origins dispatching XCM executions.
|
||||||
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
||||||
// ... but disallow generic XCM execution. As a result only teleports are allowed.
|
type XcmExecuteFilter = Everything;
|
||||||
type XcmExecuteFilter = Nothing;
|
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type XcmTeleportFilter = Everything;
|
type XcmTeleportFilter = Everything;
|
||||||
type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location.
|
type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location.
|
||||||
|
|||||||
@@ -295,10 +295,9 @@ impl pallet_xcm::Config for Runtime {
|
|||||||
// We want to disallow users sending (arbitrary) XCM programs from this chain.
|
// We want to disallow users sending (arbitrary) XCM programs from this chain.
|
||||||
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
|
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
|
||||||
type XcmRouter = XcmRouter;
|
type XcmRouter = XcmRouter;
|
||||||
// We support local origins dispatching XCM executions in principle...
|
// We support local origins dispatching XCM executions.
|
||||||
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
||||||
// ... but disallow generic XCM execution. As a result only teleports are allowed.
|
type XcmExecuteFilter = Everything;
|
||||||
type XcmExecuteFilter = Nothing;
|
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type XcmTeleportFilter = Everything;
|
type XcmTeleportFilter = Everything;
|
||||||
type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location.
|
type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location.
|
||||||
|
|||||||
@@ -297,10 +297,9 @@ impl pallet_xcm::Config for Runtime {
|
|||||||
// We want to disallow users sending (arbitrary) XCM programs from this chain.
|
// We want to disallow users sending (arbitrary) XCM programs from this chain.
|
||||||
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
|
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
|
||||||
type XcmRouter = XcmRouter;
|
type XcmRouter = XcmRouter;
|
||||||
// We support local origins dispatching XCM executions in principle...
|
// We support local origins dispatching XCM executions.
|
||||||
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
||||||
// ... but disallow generic XCM execution. As a result only teleports are allowed.
|
type XcmExecuteFilter = Everything;
|
||||||
type XcmExecuteFilter = Nothing;
|
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type XcmTeleportFilter = Everything;
|
type XcmTeleportFilter = Everything;
|
||||||
type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location.
|
type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location.
|
||||||
|
|||||||
@@ -305,10 +305,9 @@ impl pallet_xcm::Config for Runtime {
|
|||||||
// We want to disallow users sending (arbitrary) XCMs from this chain.
|
// We want to disallow users sending (arbitrary) XCMs from this chain.
|
||||||
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
|
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
|
||||||
type XcmRouter = XcmRouter;
|
type XcmRouter = XcmRouter;
|
||||||
// We support local origins dispatching XCM executions in principle...
|
// We support local origins dispatching XCM executions.
|
||||||
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
||||||
// ... but disallow generic XCM execution. As a result only teleports are allowed.
|
type XcmExecuteFilter = Everything;
|
||||||
type XcmExecuteFilter = Nothing;
|
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type XcmTeleportFilter = Everything;
|
type XcmTeleportFilter = Everything;
|
||||||
type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location.
|
type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location.
|
||||||
|
|||||||
@@ -378,9 +378,7 @@ impl pallet_xcm::Config for Runtime {
|
|||||||
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
||||||
type XcmRouter = XcmRouter;
|
type XcmRouter = XcmRouter;
|
||||||
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
||||||
type XcmExecuteFilter = Nothing;
|
type XcmExecuteFilter = Everything;
|
||||||
// ^ Disable dispatchable execute on the XCM pallet.
|
|
||||||
// Needs to be `Everything` for local testing.
|
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type XcmTeleportFilter = Everything;
|
type XcmTeleportFilter = Everything;
|
||||||
type XcmReserveTransferFilter = Everything;
|
type XcmReserveTransferFilter = Everything;
|
||||||
|
|||||||
@@ -276,10 +276,9 @@ impl pallet_xcm::Config for Runtime {
|
|||||||
// production.
|
// production.
|
||||||
type SendXcmOrigin = xcm_builder::EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
type SendXcmOrigin = xcm_builder::EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
||||||
type XcmRouter = XcmRouter;
|
type XcmRouter = XcmRouter;
|
||||||
// Anyone can execute XCM messages locally...
|
// Anyone can execute XCM messages locally.
|
||||||
type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
|
||||||
// ...but they must match our filter, which rejects everything.
|
type XcmExecuteFilter = Everything;
|
||||||
type XcmExecuteFilter = Nothing;
|
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
type XcmTeleportFilter = Everything;
|
type XcmTeleportFilter = Everything;
|
||||||
type XcmReserveTransferFilter = Everything;
|
type XcmReserveTransferFilter = Everything;
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
title: "test runtimes: allow local origins to execute arbitrary XCMs"
|
||||||
|
|
||||||
|
doc:
|
||||||
|
- audience: Runtime User
|
||||||
|
description: |
|
||||||
|
Allow arbitrary XCM execution for local origins on all test chains.
|
||||||
|
|
||||||
|
crates:
|
||||||
|
- name: asset-hub-rococo-runtime
|
||||||
|
bump: minor
|
||||||
|
- name: bridge-hub-rococo-runtime
|
||||||
|
bump: minor
|
||||||
|
- name: bridge-hub-westend-runtime
|
||||||
|
bump: minor
|
||||||
|
- name: collectives-westend-runtime
|
||||||
|
bump: minor
|
||||||
|
- name: contracts-rococo-runtime
|
||||||
|
bump: minor
|
||||||
|
- name: coretime-rococo-runtime
|
||||||
|
bump: minor
|
||||||
|
- name: coretime-westend-runtime
|
||||||
|
bump: minor
|
||||||
|
- name: people-rococo-runtime
|
||||||
|
bump: minor
|
||||||
|
- name: people-westend-runtime
|
||||||
|
bump: minor
|
||||||
|
- name: penpal-runtime
|
||||||
|
bump: minor
|
||||||
|
- name: westend-runtime
|
||||||
|
bump: minor
|
||||||
Reference in New Issue
Block a user