Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Closes: #13797
While running an upgrade handler for gaia v8 we supplement the bank metadata. In doing so we found that the metadata was not retrievable using the new KV store pattern in v0.46. Coincidentally, we were trying to retrieve the metadata before the migration had been run. Ironically, after fixing the order, it was still not retrievable because there was a bug in how the store migration was written.
The current implementation infers that the store prefix needs to be included in the key, however the prefix is already omitted as part of the prefix store used in the migration code (and subsequent test).
We iterated over the whole store to check what was the key. When we incorrectly tried to retrieve before the migration we printed out a key of
uatomuatom
. Once we switched the migrations to run before we tried retrieving the metadata we printed out the key ofuatomu
. This demonstrates the migration is applied to a key of the wrong length. The addition of one letter is from the incorrect expectation that the store prefix (0x1
) should be accounted for.instead of
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