Skip to content
Unverified Commit d569e728 authored by Branislav Kontur's avatar Branislav Kontur Committed by GitHub
Browse files

"Common good" vs "System" parachain clean up (#1406)

## Summary 
The term "common good parachain" has been abandoned in favor of "system
parachain" - e.g. [Joe's speech at
Decoded2023](https://youtu.be/CSO-ERHK2gY?t=456). This pull request
tries to fix and align code with this vision.

## Impact

The important change is implementation of `trait IsSystem` for `Id`
[here](https://github.com/paritytech/polkadot-sdk/pull/1406/files#diff-0b7b4f5b962a18ce980354592b55ab2a27b5a2e9f6f8089ec803ca73853e8583R225-R229)
where we changed condition from `< 1000` to `<= 1999`, which means that
all parachain IDs bellow 1999 (included) are considered as "system
parachain" IDs. This change has a direct impact on the following
components:

####
[ChildSystemParachainAsSuperuser](https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/xcm-builder/src/origin_conversion.rs#L72-L88)
This origin converter is used for allowing to process XCM `Transact`
from "system parachain" on the relay chain - e.g. see [configuration for
Kusama](https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/runtime/kusama/src/xcm_config.rs#L92-L101).
Only configured for Kusama, Westend, Rococo runtimes.

**No need for this feature anymore.** See
[comment](https://github.com/paritytech/polkadot-sdk/pull/1406#issuecomment-1708218715).

####
[IsChildSystemParachain](https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/xcm-builder/src/barriers.rs#L310-L317)
`IsChildSystemParachain` is used with `AllowExplicitUnpaidExecutionFrom`
barrier for checking XCM programs (they have to start with
`UnpaidExecution` instruction).
Only configured for Kusama, Westend, Rococo runtimes.

**Overall the impact is low or mostly ok because it only allows unpaid
execution for "system parachains" (e.g. AssetHub, BridgeHub...) on the
relay chain.**

####
[SiblingSystemParachainAsSuperuser](https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/xcm-builder/src/origin_conversion.rs#L94-L114)

Not used anywhere in `polkadot-sdk` repo.


## Unresolved Questions
- [ ] constants `LOWEST_USER_ID` and `LOWEST_PUBLIC_ID` seem to express
the same thing now, do we want to keep them both or deprecated one of
them? If so, which one?
- [x] determine impact for `ChildSystemParachainAsSuperuser`

## TODO

- [ ] when merged here, open PR to the `polkadot-fellows`

## Related Material
https://youtu.be/CSO-ERHK2gY?t=456

https://forum.polkadot.network/t/polkadot-protocol-and-common-good-parachains/866
https://wiki.polkadot.network/docs/learn-system-chains
parent f6072e8b
Pipeline #391650 canceled with stages
in 6 minutes and 39 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment