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

polkadot companion: #13128 (Pools commission) #6264

Merged
merged 56 commits into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
c007072
migrate to pools v4
Nov 10, 2022
fecf6d1
Merge branch 'master' into rb-pools-migrate4
Dec 7, 2022
11c690a
update types + weights
Dec 23, 2022
15b458f
Merge branch 'master' into rb-pools-migrate4
Dec 23, 2022
f33ebb1
rm BlockNumberToU32
Dec 23, 2022
3333d1b
fmt
Dec 23, 2022
d287c5b
fix
Dec 23, 2022
d65faa5
update weights
Dec 24, 2022
0401df4
fix RocksDbWeight
Dec 26, 2022
b3cf1aa
fix function name
Dec 26, 2022
e226476
weights
Dec 27, 2022
a039091
use 1 weight format
Dec 27, 2022
e5d26b1
update claim payout weights
Dec 27, 2022
7d8057e
Merge remote-tracking branch 'origin/master' into rb-pools-migrate4
Dec 28, 2022
1254626
+ as u64
Dec 28, 2022
f517d97
Merge remote-tracking branch 'origin/master' into rb-pools-migrate4
Jan 2, 2023
e57bd9c
Merge branch 'master' into rb-pools-migrate4
Jan 9, 2023
2dc8832
Merge branch 'rb-pools-migrate4' of https://github.com/paritytech/pol…
Jan 9, 2023
33dfe0d
Merge branch 'master' into rb-pools-migrate4
Jan 12, 2023
6e36c56
Merge branch 'master' into rb-pools-migrate4
Feb 19, 2023
65ed2c2
Merge branch 'master' into rb-pools-migrate4
Feb 24, 2023
37b7b30
fix rebase + fmt
Feb 24, 2023
65604ee
add weights
Feb 25, 2023
7416df0
more weights
Feb 25, 2023
37eef97
Merge remote-tracking branch 'origin/master' into rb-pools-migrate4
Feb 26, 2023
caa3230
".git/.scripts/commands/bench/bench.sh" runtime polkadot-dev pallet_n…
Feb 27, 2023
4073338
".git/.scripts/commands/bench/bench.sh" runtime kusama-dev pallet_nom…
Feb 27, 2023
dd9ea78
".git/.scripts/commands/bench/bench.sh" runtime westend-dev pallet_no…
Feb 27, 2023
e0df528
Merge remote-tracking branch 'origin/master' into rb-pools-migrate4
Feb 28, 2023
063d943
Merge branch 'master' into rb-pools-migrate4
Mar 1, 2023
41e02c2
fix
Mar 1, 2023
d6279ac
Merge branch 'master' into rb-pools-migrate4
Mar 4, 2023
f359126
Merge remote-tracking branch 'origin/master' into rb-pools-migrate4
Mar 6, 2023
d06c8e1
fix
Mar 6, 2023
6e6b858
Merge branch 'rb-pools-migrate4' of https://github.com/paritytech/pol…
Mar 6, 2023
bb4d770
".git/.scripts/commands/bench/bench.sh" runtime polkadot-dev pallet_n…
Mar 6, 2023
207f13c
".git/.scripts/commands/bench/bench.sh" runtime westend-dev pallet_no…
Mar 6, 2023
fd3b317
".git/.scripts/commands/bench/bench.sh" runtime kusama-dev pallet_nom…
Mar 6, 2023
ea234af
Merge remote-tracking branch 'origin/master' into rb-pools-migrate4
Mar 8, 2023
78b6b6a
Merge remote-tracking branch 'origin/master' into rb-pools-migrate4
Mar 9, 2023
97d5e0c
Merge remote-tracking branch 'origin/master' into rb-pools-migrate4
Mar 11, 2023
e2836b0
Merge remote-tracking branch 'origin/master' into rb-pools-migrate4
Mar 13, 2023
a026668
add InitialGlobalMaxCommission
Mar 13, 2023
f33aa70
Merge branch 'rb-pools-migrate4' of https://github.com/paritytech/pol…
Mar 13, 2023
2fb47ec
revert
Mar 13, 2023
83d4a86
global max commission migration generic
Mar 13, 2023
2fa7e1f
remove StakingMigrationV11OldPallet
Mar 13, 2023
92afe56
Merge remote-tracking branch 'origin/master' into rb-pools-migrate4
Mar 14, 2023
a9f7257
initial global max commission
Mar 14, 2023
2399bd7
Merge remote-tracking branch 'origin/master' into rb-pools-migrate4
Mar 14, 2023
b42370b
adjust global max
Mar 14, 2023
6344068
Merge remote-tracking branch 'origin/master' into rb-pools-migrate4
Mar 15, 2023
184eeba
update lockfile for {"substrate"}
Mar 15, 2023
803aa8e
Use master lock file
ggwpez Mar 15, 2023
1cf5374
Merge remote-tracking branch 'origin/master' into rb-pools-migrate4
ggwpez Mar 15, 2023
bf8e92e
cargo update -p sp-io
ggwpez Mar 15, 2023
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
1 change: 1 addition & 0 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1488,6 +1488,7 @@ pub type Migrations = (
Runtime,
governance::FellowshipReferendaInstance,
>,
pallet_nomination_pools::migration::v4::MigrateToV4<Runtime>,
);

/// Unchecked extrinsic type as expected by this runtime.
Expand Down
28 changes: 25 additions & 3 deletions runtime/kusama/src/weights/pallet_nomination_pools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,11 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: NominationPools BondedPools (r:1 w:1)
// Storage: NominationPools RewardPools (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: NominationPools GlobalMaxCommission (r:1 w:0)
fn claim_payout() -> Weight {
// Minimum execution time: 54_447 nanoseconds.
Weight::from_ref_time(54_781_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
// Minimum execution time: 64_000 nanoseconds.
Weight::from_ref_time(65_000_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
}
// Storage: NominationPools PoolMembers (r:1 w:1)
Expand Down Expand Up @@ -284,4 +285,25 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
.saturating_add(T::DbWeight::get().reads(9 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
// Storage: NominationPools BondedPools (r:1 w:1)
fn set_commission() -> Weight {
// Minimum execution time: 24_000 nanoseconds.
Weight::from_ref_time(24_000_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: NominationPools BondedPools (r:1 w:1)
fn set_commission_max() -> Weight {
// Minimum execution time: 22_000 nanoseconds.
Weight::from_ref_time(24_000_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: NominationPools BondedPools (r:1 w:1)
fn set_commission_change_rate() -> Weight {
// Minimum execution time: 21_000 nanoseconds.
Weight::from_ref_time(23_000_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
}
1 change: 1 addition & 0 deletions runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1600,6 +1600,7 @@ impl Get<&'static str> for StakingMigrationV11OldPallet {
pub type Migrations = (
pallet_balances::migration::MigrateToTrackInactive<Runtime, xcm_config::CheckAccount>,
crowdloan::migration::MigrateToTrackInactive<Runtime>,
pallet_nomination_pools::migration::v4::MigrateToV4<Runtime>,
);

/// Unchecked extrinsic type as expected by this runtime.
Expand Down
28 changes: 25 additions & 3 deletions runtime/polkadot/src/weights/pallet_nomination_pools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,11 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: NominationPools BondedPools (r:1 w:1)
// Storage: NominationPools RewardPools (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: NominationPools GlobalMaxCommission (r:1 w:0)
fn claim_payout() -> Weight {
// Minimum execution time: 54_743 nanoseconds.
Weight::from_ref_time(55_539_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
// Minimum execution time: 64_000 nanoseconds.
Weight::from_ref_time(65_000_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
}
// Storage: NominationPools PoolMembers (r:1 w:1)
Expand Down Expand Up @@ -286,4 +287,25 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
.saturating_add(T::DbWeight::get().reads(9 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
// Storage: NominationPools BondedPools (r:1 w:1)
fn set_commission() -> Weight {
// Minimum execution time: 24_000 nanoseconds.
Weight::from_ref_time(24_000_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: NominationPools BondedPools (r:1 w:1)
fn set_commission_max() -> Weight {
// Minimum execution time: 22_000 nanoseconds.
Weight::from_ref_time(24_000_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: NominationPools BondedPools (r:1 w:1)
fn set_commission_change_rate() -> Weight {
// Minimum execution time: 21_000 nanoseconds.
Weight::from_ref_time(23_000_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
}
1 change: 1 addition & 0 deletions runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1214,6 +1214,7 @@ impl Get<&'static str> for StakingMigrationV11OldPallet {
pub type Migrations = (
pallet_balances::migration::MigrateToTrackInactive<Runtime, xcm_config::CheckAccount>,
crowdloan::migration::MigrateToTrackInactive<Runtime>,
pallet_nomination_pools::migration::v4::MigrateToV4<Runtime>,
);

/// Unchecked extrinsic type as expected by this runtime.
Expand Down
28 changes: 25 additions & 3 deletions runtime/westend/src/weights/pallet_nomination_pools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,11 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: NominationPools BondedPools (r:1 w:1)
// Storage: NominationPools RewardPools (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: NominationPools GlobalMaxCommission (r:1 w:0)
fn claim_payout() -> Weight {
// Minimum execution time: 54_355 nanoseconds.
Weight::from_ref_time(54_950_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
// Minimum execution time: 64_000 nanoseconds.
Weight::from_ref_time(65_000_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
}
// Storage: NominationPools PoolMembers (r:1 w:1)
Expand Down Expand Up @@ -284,4 +285,25 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
.saturating_add(T::DbWeight::get().reads(9 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
// Storage: NominationPools BondedPools (r:1 w:1)
fn set_commission() -> Weight {
// Minimum execution time: 24_000 nanoseconds.
Weight::from_ref_time(24_000_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: NominationPools BondedPools (r:1 w:1)
fn set_commission_max() -> Weight {
// Minimum execution time: 22_000 nanoseconds.
Weight::from_ref_time(24_000_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: NominationPools BondedPools (r:1 w:1)
fn set_commission_change_rate() -> Weight {
// Minimum execution time: 21_000 nanoseconds.
Weight::from_ref_time(23_000_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
}