-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
R4R: Add Stake Genesis Intra-Tx Counter #1724
Conversation
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.
LGTM, good catch
Codecov Report
@@ Coverage Diff @@
## develop #1724 +/- ##
===========================================
+ Coverage 62.35% 62.36% +0.01%
===========================================
Files 120 120
Lines 7119 7121 +2
===========================================
+ Hits 4439 4441 +2
Misses 2429 2429
Partials 251 251 |
i * think * this consistutes a breaking change - although it shouldn't break the testnet |
I think you're right, adding the intra-tx counter would be breaking. Should we merge this into a branch thats not develop? (I'm a bit confused about where we decided we're merging breaking / non-breaking stuff) |
I don't understand why breaking changes cannot go into |
@ValarDragon yeah breaking changes should be able to go to develop non-breaking patches can go to develop and master - if we want to create a new patch release we can do it directly from master |
ohh, thanks for the clarification! |
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
Maybe we should sanity-check non-duplicate keys in the power store.
agreed on the sanity check |
@@ -29,6 +29,8 @@ func InitGenesis(ctx sdk.Context, keeper Keeper, data types.GenesisState) error | |||
|
|||
// Manually set indexes for the first time | |||
keeper.SetValidatorByPubKeyIndex(ctx, validator) | |||
|
|||
validator.BondIntraTxCounter = int16(i) // set the intra-tx counter to the order the validators are presented |
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.
shouldn't we set this value right away so its consistent ?
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.
Only the power store key uses this.
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.
@ebuchman as in set it in the genesis file as opposed to in this ordering? Yeah could be done, might be better to keep it more explicit. But then again. who get's to decide the order! I almost think for that organizational reason it should be set where it is currently.
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's still effectively set by the genesis file though, since we iterate through the validator array.
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.
yeah I guess it's alphabetical - honestly I don't think this is a real concern it's an extreme edge case, we just need something in there for key collision
* add revoked to human-readable validator * changelog * added failing test * add intra-tx counter to the genesis validators * changelog
Closes #1666
docs/
)CHANGELOG.md
cmd/gaia
andexamples/
For Admin Use: