-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: add delegations by validator index #15731
Conversation
x/staking/migrations/v5/store.go
Outdated
"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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patience in review. LGTM
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
@@ -40,6 +40,7 @@ var ( | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, haven't noticed it. Raised fix PR(#16176) thanks for finding it 🙏 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tac0turtle has this PR been backported to SDK47?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.md
Reviewers 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