Skip to content

Commit

Permalink
kusama chains: allow arbitrary XCM execution (#261)
Browse files Browse the repository at this point in the history
Kusama relay is the only chain here allowing arbitrary XCM execution.

This was enabled in paritytech/polkadot#4809 for
(afaict) allowing crafting and executing XCM DOT transfers. Now, these
are done through dedicated extrinsics and manual `pallet_xcm::execute`
is not required (for transfers at least).

AFAICT, allowing `Everything` on Kusama should also be safe at this
point (XCM is pretty mature) and fosters experimentation and more
flexibility on Kusama. But in that case, maybe we should also allow it
on Kusama system chains?

Thoughts?
  • Loading branch information
acatangiu authored May 7, 2024
1 parent cc3beb8 commit 5a50c5a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Remove DMP queue and allow `system::authorize_upgrade` in XCM's call filter ([polkadot-fellows/runtimes#280](https://github.com/polkadot-fellows/runtimes/pull/280))
- Add Pay Salary Collectives test ([polkadot-fellows/runtimes#260](https://github.com/polkadot-fellows/runtimes/pull/260))
- Include patch to release stuck collator bonds ([polkadot-fellows/runtimes#289](https://github.com/polkadot-fellows/runtimes/pull/289))
- Kusama chains: allow arbitrary XCM execution ([polkadot-fellows/runtimes#261](https://github.com/polkadot-fellows/runtimes/pull/261))

## [1.2.3] 29.04.2024

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -647,11 +647,9 @@ impl pallet_xcm::Config for Runtime {
// We want to disallow users sending (arbitrary) XCMs from this chain.
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
type XcmRouter = XcmRouter;
// We support local origins dispatching XCM executions in principle...
// Anyone can execute XCM messages locally.
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
// ... but disallow generic XCM execution. As a result only teleports and reserve transfers are
// allowed.
type XcmExecuteFilter = Nothing;
type XcmExecuteFilter = Everything;
type XcmExecutor = XcmExecutor<XcmConfig>;
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Everything;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,9 @@ impl pallet_xcm::Config for Runtime {
// We want to disallow users sending (arbitrary) XCMs from this chain.
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
type XcmRouter = XcmRouter;
// We support local origins dispatching XCM executions in principle...
// Anyone can execute XCM messages locally.
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
// ... but disallow generic XCM execution. As a result only teleports are allowed.
type XcmExecuteFilter = Nothing;
type XcmExecuteFilter = Everything;
type XcmExecutor = XcmExecutor<XcmConfig>;
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location.
Expand Down
5 changes: 2 additions & 3 deletions system-parachains/coretime/coretime-kusama/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,9 @@ impl pallet_xcm::Config for Runtime {
// We want to disallow users sending (arbitrary) XCM programs from this chain.
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
type XcmRouter = XcmRouter;
// We support local origins dispatching XCM executions in principle...
// Anyone can execute XCM messages locally.
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
// ... but disallow generic XCM execution. As a result only teleports are allowed.
type XcmExecuteFilter = Nothing;
type XcmExecuteFilter = Everything;
type XcmExecutor = XcmExecutor<XcmConfig>;
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location.
Expand Down
6 changes: 2 additions & 4 deletions system-parachains/encointer/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,9 @@ impl pallet_xcm::Config for Runtime {
// We want to disallow users sending (arbitrary) XCMs from this chain.
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
type XcmRouter = XcmRouter;
// We support local origins dispatching XCM executions in principle...
// Anyone can execute XCM messages locally.
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
// ... but disallow generic XCM execution. As a result only teleports and reserve transfers are
// allowed.
type XcmExecuteFilter = Nothing;
type XcmExecuteFilter = Everything;
type XcmExecutor = XcmExecutor<XcmConfig>;
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Everything;
Expand Down
5 changes: 2 additions & 3 deletions system-parachains/people/people-kusama/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,9 @@ impl pallet_xcm::Config for Runtime {
// We want to disallow users sending (arbitrary) XCM programs from this chain.
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
type XcmRouter = XcmRouter;
// We support local origins dispatching XCM executions in principle...
// Anyone can execute XCM messages locally.
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
// ... but disallow generic XCM execution. As a result only teleports are allowed.
type XcmExecuteFilter = Nothing;
type XcmExecuteFilter = Everything;
type XcmExecutor = XcmExecutor<XcmConfig>;
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Nothing; // This parachain is not meant as a reserve location.
Expand Down

0 comments on commit 5a50c5a

Please sign in to comment.