-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Staking Payouts Only Work for Existing Accounts #6415
Comments
Or we could allow |
I will suggest require an alive controller and use inc_ref to ensure it cannot be dead. This also helps on Polkadot that people setting controller to new account (recommended by UI) and they can't transfer fund to new account to do anything. The payout could be smaller than existential deposit so We have inc_ref for stash, but not controller substrate/frame/staking/src/lib.rs Line 1434 in 6d11c9d
|
stick to a UI "accomodation" for now, which i believe @jacogr is already working on anyway. i don't want to introduce |
I have created a PR ^^ |
@joepetrowski points out that this PR would break the use of sub accounts as controllers since they are mostly unfunded. What if instead we fallback to paying the stash in the case that the controller cannot be paid? |
In that case we can ensure the controller is alive only when reward destination is set to controller? |
@xlc we can do it, but there would be kind of an awkward check in a bunch of places:
It would increase the read count of all of these operations, which is also fine, but starting to make me feel less happy about the behavior/logic. Maybe I am being overly critical in my head, this is also a valid option technically speaking. |
The
make_payout
function in the Staking Pallet intentionally only pays out to existing accounts:Note all instances of payout use
deposit_into_existing
.However, it is possible to set your controller to a dead account, and then payouts here will fail.
(Stash can't really be dead, but maybe some fringe situation it could?)
We probably need some combination of Runtime + UI assistance to prevent users from setting their controller to a dead account, and then requesting a payout.
The text was updated successfully, but these errors were encountered: