Skip to content

Commit 9fc696f

Browse files
committed
"Common good" vs "System" parachain nits
1 parent 3369168 commit 9fc696f

5 files changed

Lines changed: 9 additions & 8 deletions

File tree

cumulus/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
//!
2121
//! ### Governance
2222
//!
23-
//! As a common good parachain, Collectives defers its governance (namely, its `Root` origin), to
23+
//! As a system parachain, Collectives defers its governance (namely, its `Root` origin), to
2424
//! its Relay Chain parent, Polkadot.
2525
//!
2626
//! ### Collator Selection

cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ pub type Barrier = TrailingSetTopicAsId<
163163
// If the message is one that immediately attemps to pay for execution, then
164164
// allow it.
165165
AllowTopLevelPaidExecutionFrom<Everything>,
166-
// Common Good Assets parachain, parent and its exec plurality get free
166+
// System Assets parachain, parent and its exec plurality get free
167167
// execution
168168
AllowExplicitUnpaidExecutionFrom<(
169169
CommonGoodAssetsParachain,

polkadot/parachain/src/primitives.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,14 @@ impl From<i32> for Id {
199199
}
200200
}
201201

202-
const USER_INDEX_START: u32 = 1000;
202+
// System parachain ID is considered `< 2000`
203+
const SYSTEM_INDEX_END: u32 = 1999;
203204
const PUBLIC_INDEX_START: u32 = 2000;
204205

205206
/// The ID of the first user (non-system) parachain.
206-
pub const LOWEST_USER_ID: Id = Id(USER_INDEX_START);
207+
pub const LOWEST_USER_ID: Id = Id(PUBLIC_INDEX_START);
207208

208-
/// The ID of the first publicly registerable parachain.
209+
/// The ID of the first publicly registrable parachain.
209210
pub const LOWEST_PUBLIC_ID: Id = Id(PUBLIC_INDEX_START);
210211

211212
impl Id {
@@ -223,7 +224,7 @@ pub trait IsSystem {
223224

224225
impl IsSystem for Id {
225226
fn is_system(&self) -> bool {
226-
self.0 < USER_INDEX_START
227+
self.0 <= SYSTEM_INDEX_END
227228
}
228229
}
229230

polkadot/runtime/kusama/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ impl pallet_staking::EraPayout<Balance> for EraPayout {
637637
// all para-ids that are currently active.
638638
let auctioned_slots = Paras::parachains()
639639
.into_iter()
640-
// all active para-ids that do not belong to a system or common good chain is the number
640+
// all active para-ids that do not belong to a system chain is the number
641641
// of parachains that we should take into account for inflation.
642642
.filter(|i| *i >= LOWEST_PUBLIC_ID)
643643
.count() as u64;

polkadot/runtime/polkadot/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ impl pallet_staking::EraPayout<Balance> for EraPayout {
547547
// all para-ids that are not active.
548548
let auctioned_slots = Paras::parachains()
549549
.into_iter()
550-
// all active para-ids that do not belong to a system or common good chain is the number
550+
// all active para-ids that do not belong to a system chain is the number
551551
// of parachains that we should take into account for inflation.
552552
.filter(|i| *i >= LOWEST_PUBLIC_ID)
553553
.count() as u64;

0 commit comments

Comments
 (0)