refactor: add delegations by validator index#15731
Conversation
| "github.com/cosmos/cosmos-sdk/x/staking/types" | ||
| ) | ||
|
|
||
| func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) (storetypes.KVStore, error) { |
There was a problem hiding this comment.
it would be good if we had some tooling to grab a state export from any mainnet then run the migration to see what the time will be. This would allow us to add warnings for users when upgrading.
Out of scope for this pr but something we should so in the near future
…s-sdk into ap/delegations-by-validator
alexanderbez
left a comment
There was a problem hiding this comment.
Thanks for the patience in review. LGTM
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
| RedelegationKey = []byte{0x34} // key for a redelegation | ||
| RedelegationByValSrcIndexKey = []byte{0x35} // prefix for each key for an redelegation, by source validator operator | ||
| RedelegationByValDstIndexKey = []byte{0x36} // prefix for each key for an redelegation, by destination validator operator | ||
| DelegationByValIndexKey = []byte{0x37} // key for delegations by a validator |
There was a problem hiding this comment.
Sorry to poke my head here, but this is a bug no? Looks like the same key value as UnbondingIDKey below?
There was a problem hiding this comment.
yup that is right, cant wait to rewrite this module to use colletions. @atheeshp can you fix this please
There was a problem hiding this comment.
Sorry, haven't noticed it. Raised fix PR(#16176) thanks for finding it 🙏 .
There was a problem hiding this comment.
@tac0turtle has this PR been backported to SDK47?
There was a problem hiding this comment.
This feature isn't included in v0.47, but is in v0.50.
Description
ref: #3863 , #5231
Closes: #15162
part of work related to: #15494
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!to the type prefix if API or client breaking changeCHANGELOG.mdReviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!in the type prefix if API or client breaking change