-
Notifications
You must be signed in to change notification settings - Fork 732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Common good" vs "System" parachain clean up #1406
Conversation
9fc696f
to
87e9651
Compare
Based on discussion with @joepetrowski, |
IMO OK to combine, slight preference for |
@paritytech/polkadot-review Can you please confirm that we can remove |
I am 99.9% sure this value is never used anywhere except the logic to allow Root privilege from a parachain (which we've removed here anyway). |
polkadot/parachain/src/primitives.rs
Outdated
const PUBLIC_INDEX_START: u32 = 2000; | ||
|
||
/// The ID of the first user (non-system) parachain. | ||
pub const LOWEST_USER_ID: Id = Id(USER_INDEX_START); | ||
pub const LOWEST_USER_ID: Id = Id(PUBLIC_INDEX_START); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not able to find any reference on github other than forks of Polkadot:
https://github.com/search?q=LOWEST_USER_ID+language%3ARust&type=code&ref=advsearch
(let me know if you know how to filter out forks in the search query)
so it should be fine to remove
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/polkadot-release-analysis-v1-2-0/4451/1 |
…depend on crates.io versions) (#45) ## Summary This PR proposes several changes. - The alignment of the terminology used for "common-good" and "system" parachains in the Polkadot ecosystem, as discussed in [PR#1406](paritytech/polkadot-sdk#1406). - Additionally, it suggests the removal of the `ChildSystemParachainAsSuperuser` feature from the Kusama runtime, as mentioned in a comment on the same PR [comment link](paritytech/polkadot-sdk#1406 (comment)). - Relax `force_default_xcm_version` in `SafeCallFilter` for system parachains - based on paritytech/polkadot-sdk#2385 - Add `Storage` item to `PolkadotXcm` pallet definition for BridgeHubs (now we cannot see storage items for `pallet_xcm` in polkadot.js) - based on paritytech/polkadot-sdk#2385 ## Explanation A significant [change of PR#1406](https://github.com/paritytech/polkadot-sdk/pull/1406/files#diff-0b7b4f5b962a18ce980354592b55ab2a27b5a2e9f6f8089ec803ca73853e8583L202-R224) is the redefinition of what constitutes a "system" parachain. Previously, a "system" parachain was identified with `para_id <= 1000`. However, the [PR#1406](paritytech/polkadot-sdk#1406) changed a definition, considering a "system" parachain to have `para_id <= 1999`. One consequence of this change is the reconsideration of the [`ChildSystemParachainAsSuperuser`](https://github.com/paritytech/polkadot-sdk/blob/a50e6ba7af50a4be9ae78ebb90e86a61f3dd85e1/polkadot/xcm/xcm-builder/src/origin_conversion.rs#L72-L88) feature. This feature relies on the [`is_system`](https://github.com/paritytech/polkadot-sdk/blob/a50e6ba7af50a4be9ae78ebb90e86a61f3dd85e1/polkadot/parachain/src/primitives.rs#L216-L226) function, which, in turn, depends on the para_id of a parachain to determine "system" status. However, further examination has revealed that there is no known scenario in which a system parachain would need to call the Kusama runtime with `RuntimeOrigin::root()` privileges. Consequently, maintaining the `ChildSystemParachainAsSuperuser` feature in the Kusama runtime is deemed unnecessary. ## References - [GitHub Pull Request #1406](paritytech/polkadot-sdk#1406) - [GitHub Pull Request #2385](paritytech/polkadot-sdk#2385) - Redo of #32 on main. --------- Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
Summary
The term "common good parachain" has been abandoned in favor of "system parachain" - e.g. Joe's speech at Decoded2023. This pull request tries to fix and align code with this vision.
Impact
The important change is implementation of
trait IsSystem
forId
here 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
This origin converter is used for allowing to process XCM
Transact
from "system parachain" on the relay chain - e.g. see configuration for Kusama.Only configured for Kusama, Westend, Rococo runtimes.
No need for this feature anymore. See comment.
IsChildSystemParachain
IsChildSystemParachain
is used withAllowExplicitUnpaidExecutionFrom
barrier for checking XCM programs (they have to start withUnpaidExecution
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
Not used anywhere in
polkadot-sdk
repo.Unresolved Questions
LOWEST_USER_ID
andLOWEST_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?ChildSystemParachainAsSuperuser
TODO
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