-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
Currently this function: https://github.com/cosmos/cosmos-sdk/blob/develop/x/stake/keeper/key.go#L158 will have collisions at the same key. e.g.
Delegator has 10 steak bonded to validator A.
Delegator rebonds 3 steak to validator B
Delegator rebonds 5 steak to validator B - Issue here, the key is already in use.
One simple fix is to add an additional component to that key derivation, by appending bytes for a global delegation index, and then incrementing the global delegation index. Anything trying to access that redelegation can iterate over all the different nonces.
From a discussion with @cwgoes
Reactions are currently unavailable