-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Withdraw unbounded possible before slash is applied #9469
Comments
The current_era and active_era are always the same except for 1 session, since the session pallet has 1 session delay. Only when we elect a new validator set, the current era is First glance, this does not seem like an issue for me. Withdrawing happens on the basis of Slashing happens on the basis of While current_era and active_era can be phase-shifted, the progress at the same pace, so the slash should always happen before withdrawing is possible. |
Yes, that is how it should be. But what I noticed is that the slash is not applied for the |
Hmm yeah this seems to be the case: https://github.com/paritytech/substrate/blob/master/frame/staking/src/lib.rs#L447 The |
(I haven't had time to confirm this yet, but added it to our backlog so eventually we get to it. ) |
This was fixed as a part of #11823 |
Staking pallet applies slashes up to but not including active_era - slashing_defer_duration (27)
But withdraw unbonded is allowed starting from current_era = unbonded_era + bondig_duration (28).
Taking into account that current_era is set before active_era i think it is possible to unbond in the era when unapplied slash is created and perform withraw unbonded when corresponding current era is set before active_era changes (so before slash is applied).
The text was updated successfully, but these errors were encountered: