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 (polkadot-fellows#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 committed Apr 29, 2024
1 parent aedbfc8 commit 887c936
Show file tree
Hide file tree
Showing 3 changed files with 192 additions and 170 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ Changelog for the runtimes governed by the Polkadot Fellowship.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

### Added

- Add migration to Kusama Coretime to onboard People Chain without long delay ([polkadot-fellows/runtimes#286](https://github.com/polkadot-fellows/runtimes/pull/286))

### Fixed

- Clean up outdated assignment in Kusama Coretime Chain state ([polkadot-fellows/runtimes#286](https://github.com/polkadot-fellows/runtimes/pull/286))

## [1.2.2] 20.04.2024

### 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 887c936

Please sign in to comment.