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

Commit

Permalink
polkadot companion: #13128 (Pools commission) (#6264)
Browse files Browse the repository at this point in the history
* migrate to pools v4

* update types + weights

* rm BlockNumberToU32

* fmt

* fix

* update weights

* fix RocksDbWeight

* fix function name

* weights

* use 1 weight format

* update claim payout weights

* + as u64

* fix rebase + fmt

* add weights

* more weights

* ".git/.scripts/commands/bench/bench.sh" runtime polkadot-dev pallet_nomination_pools

* ".git/.scripts/commands/bench/bench.sh" runtime kusama-dev pallet_nomination_pools

* ".git/.scripts/commands/bench/bench.sh" runtime westend-dev pallet_nomination_pools

* fix

* fix

* ".git/.scripts/commands/bench/bench.sh" runtime polkadot-dev pallet_nomination_pools

* ".git/.scripts/commands/bench/bench.sh" runtime westend-dev pallet_nomination_pools

* ".git/.scripts/commands/bench/bench.sh" runtime kusama-dev pallet_nomination_pools

* add InitialGlobalMaxCommission

* revert

* global max commission migration generic

* remove StakingMigrationV11OldPallet

* initial global max commission

* adjust global max

* update lockfile for {"substrate"}

* Use master lock file

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* cargo update -p sp-io

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: parity-processbot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  • Loading branch information
Ross Bulat and ggwpez committed Mar 15, 2023
1 parent 36ab336 commit 40ab88b
Show file tree
Hide file tree
Showing 7 changed files with 786 additions and 550 deletions.
366 changes: 183 additions & 183 deletions Cargo.lock

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1456,17 +1456,22 @@ pub type SignedExtra = (
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
);

pub struct StakingMigrationV11OldPallet;
impl Get<&'static str> for StakingMigrationV11OldPallet {
fn get() -> &'static str {
"VoterList"
pub struct NominationPoolsMigrationV4OldPallet;
impl Get<Perbill> for NominationPoolsMigrationV4OldPallet {
fn get() -> Perbill {
Perbill::from_percent(10)
}
}

/// All migrations that will run on the next runtime upgrade.
///
/// Should be cleared after every release.
pub type Migrations = ();
pub type Migrations = (
pallet_nomination_pools::migration::v4::MigrateToV4<
Runtime,
NominationPoolsMigrationV4OldPallet,
>,
);

/// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic =
Expand Down
312 changes: 193 additions & 119 deletions runtime/kusama/src/weights/pallet_nomination_pools.rs

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1585,17 +1585,22 @@ pub type SignedExtra = (
claims::PrevalidateAttests<Runtime>,
);

pub struct StakingMigrationV11OldPallet;
impl Get<&'static str> for StakingMigrationV11OldPallet {
fn get() -> &'static str {
"VoterList"
pub struct NominationPoolsMigrationV4OldPallet;
impl Get<Perbill> for NominationPoolsMigrationV4OldPallet {
fn get() -> Perbill {
Perbill::zero()
}
}

/// All migrations that will run on the next runtime upgrade.
///
/// Should be cleared after every release.
pub type Migrations = ();
pub type Migrations = (
pallet_nomination_pools::migration::v4::MigrateToV4<
Runtime,
NominationPoolsMigrationV4OldPallet,
>,
);

/// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic =
Expand Down
304 changes: 189 additions & 115 deletions runtime/polkadot/src/weights/pallet_nomination_pools.rs

Large diffs are not rendered by default.

16 changes: 11 additions & 5 deletions runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1197,17 +1197,23 @@ pub type SignedExtra = (
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
);

pub struct StakingMigrationV11OldPallet;
impl Get<&'static str> for StakingMigrationV11OldPallet {
fn get() -> &'static str {
"VoterList"
pub struct NominationPoolsMigrationV4OldPallet;
impl Get<Perbill> for NominationPoolsMigrationV4OldPallet {
fn get() -> Perbill {
Perbill::from_percent(100)
}
}

/// All migrations that will run on the next runtime upgrade.
///
/// Should be cleared after every release.
pub type Migrations = (clean_state_migration::CleanMigrate,);
pub type Migrations = (
clean_state_migration::CleanMigrate,
pallet_nomination_pools::migration::v4::MigrateToV4<
Runtime,
NominationPoolsMigrationV4OldPallet,
>,
);

/// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic =
Expand Down
308 changes: 190 additions & 118 deletions runtime/westend/src/weights/pallet_nomination_pools.rs

Large diffs are not rendered by default.

0 comments on commit 40ab88b

Please sign in to comment.