Closed td202 closed 2 years ago
Since the current pool of bakers is relatively small, I think we can mitigate the issue for the P2 to P3 (Alpha Centauri 3.0) update by advising all bakers not to reduce or unregister within the week before a planned protocol update, rather than making a change to the protocol update (or the protocol).
For the P4 protocol version, we should change the way that cooldown expiry is represented to an absolute time. This would then have a stable meaning after a subsequent protocol update. The migration to P4 would convert the epoch expiry to an absolute expiry time.
My recollection is that this has been fixed by the #253 PR. Is this correct @td202 ? If so, please close this issue.
Bug Description
For the existing protocol updates (P1 to P2, P2 to P3), bakers that are in a cooldown period during the protocol update will have their cooldown period (significantly) extended after the protocol update. This is caused by the following:
In practice, this means that a baker that deregisters or reduces stake within 1 week (the current cooldown period) before a protocol update will have to wait for an additional length of time equal to the time between the protocol update and the previous protocol update (or the start of the chain).
Steps to Reproduce Reduce stake or unregister a baker less than one week before a protocol update.
Expected Result The baker's cooldown expires one week later, and the appropriate funds are unlocked.
Actual Result The baker's cooldown does not expire and the funds remain locked for a prolonged period.
Versions