Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Nomination Pools migration v5: RewardPool fix #6957

Merged
merged 9 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
366 changes: 183 additions & 183 deletions Cargo.lock

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1475,12 +1475,17 @@ impl Get<Perbill> for NominationPoolsMigrationV4OldPallet {

/// All migrations that will run on the next runtime upgrade.
///
/// Should be cleared after every release.
/// This contains the combined migrations of the last 10 releases. It allows to skip runtime
/// upgrades in case governance decides to do so.
#[allow(deprecated)]
pub type Migrations = (
// 0.9.40
pallet_nomination_pools::migration::v4::MigrateToV4<
Runtime,
NominationPoolsMigrationV4OldPallet,
>,
// Unreleased - add new migrations here:
pallet_nomination_pools::migration::v5::MigrateToV5<Runtime>,
parachains_configuration::migration::v5::MigrateToV5<Runtime>,
);

Expand Down
2 changes: 1 addition & 1 deletion runtime/parachains/src/configuration/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ pub mod v5 {
fn pre_upgrade() -> Result<Vec<u8>, &'static str> {
log::trace!(target: crate::configuration::LOG_TARGET, "Running pre_upgrade()");

ensure!(StorageVersion::get::<Pallet<T>>() == 3, "The migration requires version 3");
ensure!(StorageVersion::get::<Pallet<T>>() == 4, "The migration requires version 4");
Ok(Vec::new())
}

Expand Down
6 changes: 5 additions & 1 deletion runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1412,12 +1412,16 @@ impl Get<Perbill> for NominationPoolsMigrationV4OldPallet {

/// All migrations that will run on the next runtime upgrade.
///
/// Should be cleared after every release.
/// This contains the combined migrations of the last 10 releases. It allows to skip runtime upgrades in case governance decides to do so.
#[allow(deprecated)]
pub type Migrations = (
// 0.9.40
pallet_nomination_pools::migration::v4::MigrateToV4<
Runtime,
NominationPoolsMigrationV4OldPallet,
>,
// Unreleased - add new migrations here:
pallet_nomination_pools::migration::v5::MigrateToV5<Runtime>,
ggwpez marked this conversation as resolved.
Show resolved Hide resolved
parachains_configuration::migration::v5::MigrateToV5<Runtime>,
);

Expand Down
3 changes: 2 additions & 1 deletion runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,8 @@ pub type UncheckedExtrinsic =

/// All migrations that will run on the next runtime upgrade.
///
/// Should be cleared after every release.
/// This contains the combined migrations of the last 10 releases. It allows to skip runtime
/// upgrades in case governance decides to do so.
pub type Migrations = parachains_configuration::migration::v5::MigrateToV5<Runtime>;

/// Executive: handles dispatch to the various modules.
Expand Down
2 changes: 1 addition & 1 deletion runtime/test-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ impl pallet_indices::Config for Runtime {
}

parameter_types! {
pub storage ExistentialDeposit: Balance = 1 * CENTS;
pub const ExistentialDeposit: Balance = 1 * CENTS;
pub storage MaxLocks: u32 = 50;
pub const MaxReserves: u32 = 50;
}
Expand Down
7 changes: 6 additions & 1 deletion runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1207,13 +1207,18 @@ impl Get<Perbill> for NominationPoolsMigrationV4OldPallet {

/// All migrations that will run on the next runtime upgrade.
///
/// Should be cleared after every release.
/// This contains the combined migrations of the last 10 releases. It allows to skip runtime
/// upgrades in case governance decides to do so.
#[allow(deprecated)]
pub type Migrations = (
// 0.9.40
clean_state_migration::CleanMigrate,
pallet_nomination_pools::migration::v4::MigrateToV4<
Runtime,
NominationPoolsMigrationV4OldPallet,
>,
// Unreleased - add new migrations here:
pallet_nomination_pools::migration::v5::MigrateToV5<Runtime>,
parachains_configuration::migration::v5::MigrateToV5<Runtime>,
);

Expand Down