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

Commit

Permalink
[Companion] Allow StakingAdmin to set min_commission (#6444)
Browse files Browse the repository at this point in the history
* rename staking origin

* fix comments

* rename origin

* give fake weight before re-benchmarking

* ".git/.scripts/bench-bot.sh" runtime westend-dev pallet_staking

* ".git/.scripts/bench-bot.sh" runtime polkadot-dev pallet_staking

* ".git/.scripts/bench-bot.sh" runtime kusama-dev pallet_staking

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
  • Loading branch information
Ank4n authored Dec 26, 2022
1 parent 8ac29d3 commit 58c901b
Show file tree
Hide file tree
Showing 8 changed files with 706 additions and 665 deletions.
362 changes: 182 additions & 180 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -584,8 +584,7 @@ impl pallet_staking::Config for Runtime {
type SessionsPerEra = SessionsPerEra;
type BondingDuration = BondingDuration;
type SlashDeferDuration = SlashDeferDuration;
// The staking admin or root can cancel the slash.
type SlashCancelOrigin = EitherOf<EnsureRoot<Self::AccountId>, StakingAdmin>;
type AdminOrigin = EitherOf<EnsureRoot<Self::AccountId>, StakingAdmin>;
type SessionInterface = Self;
type EraPayout = EraPayout;
type NextNewSession = Session;
Expand Down
333 changes: 173 additions & 160 deletions runtime/kusama/src/weights/pallet_staking.rs

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ parameter_types! {
pub const MaxNominations: u32 = <NposCompactSolution16 as frame_election_provider_support::NposSolution>::LIMIT as u32;
}

type SlashCancelOrigin = EitherOfDiverse<
type StakingAdminOrigin = EitherOfDiverse<
EnsureRoot<AccountId>,
pallet_collective::EnsureProportionAtLeast<AccountId, CouncilCollective, 3, 4>,
>;
Expand Down Expand Up @@ -599,8 +599,7 @@ impl pallet_staking::Config for Runtime {
type SessionsPerEra = SessionsPerEra;
type BondingDuration = BondingDuration;
type SlashDeferDuration = SlashDeferDuration;
// A super-majority of the council can cancel the slash.
type SlashCancelOrigin = SlashCancelOrigin;
type AdminOrigin = StakingAdminOrigin;
type SessionInterface = Self;
type EraPayout = EraPayout;
type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
Expand Down
331 changes: 173 additions & 158 deletions runtime/polkadot/src/weights/pallet_staking.rs

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions runtime/test-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,7 @@ impl pallet_staking::Config for Runtime {
type SessionsPerEra = SessionsPerEra;
type BondingDuration = BondingDuration;
type SlashDeferDuration = SlashDeferDuration;
// A majority of the council can cancel the slash.
type SlashCancelOrigin = frame_system::EnsureNever<()>;
type AdminOrigin = frame_system::EnsureNever<()>;
type SessionInterface = Self;
type EraPayout = pallet_staking::ConvertCurve<RewardCurve>;
type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
Expand Down
3 changes: 1 addition & 2 deletions runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,7 @@ impl pallet_staking::Config for Runtime {
type SessionsPerEra = SessionsPerEra;
type BondingDuration = BondingDuration;
type SlashDeferDuration = SlashDeferDuration;
// A majority of the council can cancel the slash.
type SlashCancelOrigin = EnsureRoot<AccountId>;
type AdminOrigin = EnsureRoot<AccountId>;
type SessionInterface = Self;
type EraPayout = pallet_staking::ConvertCurve<RewardCurve>;
type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
Expand Down
331 changes: 173 additions & 158 deletions runtime/westend/src/weights/pallet_staking.rs

Large diffs are not rendered by default.

0 comments on commit 58c901b

Please sign in to comment.