Make SDK staking hook changes robust to order of staking.EndBlock
and CanComplete
#233
Labels
scope: cosmos-sdk
Integration with Cosmos SDK
type: bug
Issues that need priority attention -- something isn't working
type: feature-request
New feature or request improvement
In the current latest commit
https://github.com/cosmos/cosmos-sdk/blob/c783aea68fbd856c2b188b2d467a7fa5cb4df1e6/x/staking/keeper/unbonding.go#L332-L343
liveness property for unbonding in all cases is dependent on the order of
staking.EndBlock
and (at least)validatorUnbondingCanComplete
.Since the
CanComplete
functions are SDK side and can be called by anyone we must either enforce a contract on ordering, and be OK with that, or change the design slightly to allow liveness in all cases.The last commit is faulty anyway due to
validatorUnbondingCanComplete
must take into account (re)bonded validators #232so we have to make some changes anyway.
I have a fix for #232 here https://github.com/danwt/cosmos-sdk/tree/7c48c6c11f6d57ae96ad94466078fdf68df0bf73 but it is explicity requiring a ordering contract (see lines)
so the job is not complete.
The text was updated successfully, but these errors were encountered: