Refactor Payee
and RewardDestination
for split and controller removal
#1195
Labels
I5-enhancement
An additional feature request.
This is an issue to track refactoring efforts of
RewardDestination
. The goals are two-fold:Controller
variant fromRewardDestination
enum.Split
variant to compound a percentage of rewards, and send the remaining as free balance, if any, to a specified account.The proposed solution that this issue will pursue is that of a lazy migration. There are around 69k
Payee
records in storage now, so a single block migration is not a viable proposition.A proposed new enum,
PayoutDestination
, removesController
, addsSplit
, and renames the variants to account for the fact that the stash & controller terminology is being deprecated in staking. This new enum will be used in a newPayees
storage item.What has come out of a Polkadot Forum discussion is also support for a simplified verb-based enum, that also uses
Split
to account for 100% of the payout to go to an account as free balance, without the need for a separate variant to do that.Once all
Payee
records have been migrated to a newPayees
storage item, we can confidently remove the former and replaceRewardDestination
withPayoutDestination
throughout the codebase.Migrating
RewardDestination
toPayoutDestination
:Stash
->Deposit(stash)
Controller
->Deposit(controller)
Account(AccountId)
->Deposit(account)
Staked
->Stake
None
->Forgo
.PR 1: Introduce new items,
update_payee
to migrate toPayoutDestination
/Payees
.#1196
update_payee
.PR 2:
RewardDestination
enum andPayee
storage items.get_payout_destination
and use storage getter.The text was updated successfully, but these errors were encountered: