-
Notifications
You must be signed in to change notification settings - Fork 742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implements maximum validator payout per era #1859
Conversation
The CI pipeline was cancelled due to failure one of the required jobs. |
@@ -352,7 +353,8 @@ impl pallet_staking::Config for Runtime { | |||
type SlashDeferDuration = SlashDeferDuration; | |||
type AdminOrigin = frame_system::EnsureNever<()>; | |||
type SessionInterface = Self; | |||
type EraPayout = pallet_staking::ConvertCurve<RewardCurve>; | |||
type MaxValidatorsPayout = MaxValidatorsPayout; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type MaxValidatorsPayout = MaxValidatorsPayout; |
If you were to do this approach, I don't think there is any need to pass MaxValidatorsPayout
to the staking pallet. Whatever cap is needed, should already be applied to RewardCurve
or whatever type is implementing type EraPayout
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit wrong because of https://github.com/paritytech/polkadot-sdk/pull/1859/files#r1382983349, but in any case we probably won't need it.
Closing due to #403 (comment) |
* message delivery transaction is not free!!! * test pays_fee
This PR implements an (optional) cap of the era inflation that is allocated to staking rewards. This mechanism can be used to guarantee a minimum treasury inflow as per this discussion.
The (percent) maximum validators payout can be set through
SystemCall::set_storage
.Note: The
storage
parameter type in the runtime configs only sets the pre-set_storage
default value. Once the value is set on-chain, the default will be a noop and not anymore a source of truth.Todo (once merged)
era_payout
impl included)Related to and possibly replacing #1660
Closes #403