mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-01 05:41:03 +00:00
RFC 14: Improve locking mechanism for parachains (#1290)
* rfc14 * Update polkadot/runtime/common/src/paras_registrar/mod.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update polkadot/runtime/common/src/paras_registrar/mod.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update polkadot/runtime/common/src/paras_registrar/mod.rs Co-authored-by: Bastian Köcher <git@kchr.de> * fmt * fix * Update polkadot/runtime/common/src/paras_registrar/migration.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fmt * 2224 is unlocked * update migration list * update comment * use VersionedMigration --------- Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
@@ -103,7 +103,7 @@ frame-system-benchmarking = { path = "../../../substrate/frame/system/benchmarki
|
||||
pallet-election-provider-support-benchmarking = { path = "../../../substrate/frame/election-provider-support/benchmarking", default-features = false, optional = true }
|
||||
hex-literal = "0.4.1"
|
||||
|
||||
runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false }
|
||||
runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false, features = ["experimental"] }
|
||||
runtime-parachains = { package = "polkadot-runtime-parachains", path = "../parachains", default-features = false }
|
||||
primitives = { package = "polkadot-primitives", path = "../../primitives", default-features = false }
|
||||
|
||||
|
||||
@@ -1215,6 +1215,7 @@ impl parachains_paras::Config for Runtime {
|
||||
type UnsignedPriority = ParasUnsignedPriority;
|
||||
type QueueFootprinter = ParaInclusion;
|
||||
type NextSessionRotation = Babe;
|
||||
type OnNewHead = Registrar;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -1710,6 +1711,19 @@ pub mod migrations {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ParachainsToUnlock;
|
||||
impl Contains<ParaId> for ParachainsToUnlock {
|
||||
fn contains(id: &ParaId) -> bool {
|
||||
let id: u32 = (*id).into();
|
||||
// ksuama parachains/parathreads that are locked and never produced block
|
||||
match id {
|
||||
2003 | 2008 | 2018 | 2077 | 2089 | 2111 | 2112 | 2120 | 2126 | 2127 | 2130 |
|
||||
2226 | 2227 | 2231 | 2233 | 2237 | 2256 | 2257 | 2261 | 2268 | 2275 => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Unreleased migrations. Add new ones here:
|
||||
pub type Unreleased = (
|
||||
init_state_migration::InitMigrate,
|
||||
@@ -1741,6 +1755,8 @@ pub mod migrations {
|
||||
UpgradeSessionKeys,
|
||||
|
||||
parachains_configuration::migration::v9::MigrateToV9<Runtime>,
|
||||
// Migrate parachain info format
|
||||
paras_registrar::migration::VersionCheckedMigrateToV1<Runtime, ParachainsToUnlock>,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user