-
Notifications
You must be signed in to change notification settings - Fork 607
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
Add Block Height to EpochInfo #562
Add Block Height to EpochInfo #562
Conversation
proto/osmosis/epochs/genesis.proto
Outdated
int64 start_height = 8; | ||
int64 current_epoch_start_height = 9; |
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.
Should just be one field correct? (I think just current_epoch_start_height
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.
addressed in 535e15c
Codecov Report
@@ Coverage Diff @@
## main #562 +/- ##
=======================================
Coverage 20.31% 20.32%
=======================================
Files 164 164
Lines 23262 23264 +2
=======================================
+ Hits 4726 4728 +2
Misses 17762 17762
Partials 774 774
Continue to review full report at Codecov.
|
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.
Perfect, the change LGTM!
It just occurred to me, would it be easy to make a test where you manually protobuf serialized an epoch info prior to this change, and ensured that it can still be decoded in the new logic?
We basically need to double check that in order to not need any state migrations before it gets on mainnet. Sorry for not giving that feedback earlier.
@ValarDragon I'll take a look into what this may entail - assuming mocking generated protobuf definitions and running backwards-compatible tests. I don't think this would be ideal but a temporary solution could be to check for the existence of the new proto property definition and removing the check after migration. Also, let me know if the base branch should be changed to a different branch if this shouldn't be targeting |
535e15c
to
a821daa
Compare
The test shouldn't be too complex, protobuf should still allow parsing old serialized data with the new proto format, as long as no new required fields were added. (As is the case in this PR) So it would protobuf serializing in old code, copying those bytes out, and then making a new test in this branch that tried proto deserializing those bytes and got no error |
@ValarDragon fbc9a1d should address legacy |
Perfect, thanks! |
Closes: #452
Description
NOTES:
start_height
andcurrent_epoch_start_height
fields have been added following the timing scheme. If some of this information is unnecessary, please advise and I will deprecate accordinglymake proto-all
appears to have bumped the cosmos-sdk version dependencyFor contributor use:
docs/
) or specification (x/<module>/spec/
)Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorer