Skip to content

Commit

Permalink
Add migrations to onboard people immediately and tidy up previous int…
Browse files Browse the repository at this point in the history
…ervention (#286)

When calling the reserve extrinsic after sales have started, the
assignment will be reserved, but two sale period boundaries must pass
before the core is actually assigned.

Since this can take between 28 and 56 days on production networks, a new
extrinsic is introduced to shorten the timeline at the "cost" of more
weight in paritytech/polkadot-sdk#4273.

This essentially performs four actions:
1. Add an additional core for the new reservation
2. Reserve it (applies after two sale boundaries)
3. Add it to the Workplan for the next sale period
4. Add it to the Workplan for the rest of the current sale period

To allow a quick People Chain onboarding on Kusama, a migration is
introduced here which does the same thing without needing to wait for a
release and to upgrade the runtimes repo.

Another migration is added to clean up an outdated assignment in state
from the old sale start before the leases were added. This avoids the
first lease (parachain 2000) losing its core to the new pool core a few
days before it is given one again with the new timeline at the end of
the new sale period 0.

---------

Co-authored-by: joe petrowski <[email protected]>
  • Loading branch information
seadanda and joepetrowski authored Apr 29, 2024
1 parent 5cf99f3 commit 374e092
Show file tree
Hide file tree
Showing 3 changed files with 184 additions and 170 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Add `pallet-vesting` to Asset Hubs ([polkadot-fellows/runtimes#269](https://github.com/polkadot-fellows/runtimes/pull/269))
- Fix Kusama Coretime launch issues: import leases and fix renewals for short leases ([polkadot-fellows/runtimes#276](https://github.com/polkadot-fellows/runtimes/pull/276))
- 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 migration to Kusama Coretime to onboard People Chain without long delay ([polkadot-fellows/runtimes#286](https://github.com/polkadot-fellows/runtimes/pull/286))
- Clean up outdated assignment in Kusama Coretime Chain state ([polkadot-fellows/runtimes#286](https://github.com/polkadot-fellows/runtimes/pull/286))

### Fixed

Expand Down
5 changes: 3 additions & 2 deletions system-parachains/coretime/coretime-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ pub type UncheckedExtrinsic =
/// Migrations to apply on runtime upgrade.
pub type Migrations = (
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,
migrations::bootstrapping::ImportLeases,
migrations::bootstrapping::RemoveOutdatedPoolAssignment,
migrations::bootstrapping::OnboardPeople,
);

/// Executive: handles dispatch to the various modules.
Expand All @@ -133,7 +134,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("coretime-kusama"),
impl_name: create_runtime_str!("coretime-kusama"),
authoring_version: 1,
spec_version: 1_002_002,
spec_version: 1_002_003,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 0,
Expand Down
Loading

0 comments on commit 374e092

Please sign in to comment.