-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
WIP: Demonstrate staking bug #2188
Conversation
Its failing in test_sim_modules by itself: https://circleci.com/gh/cosmos/cosmos-sdk/25616?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link |
Codecov Report
@@ Coverage Diff @@
## dev/benchmark_simulation #2188 +/- ##
===========================================================
Coverage ? 63.62%
===========================================================
Files ? 136
Lines ? 8270
Branches ? 0
===========================================================
Hits ? 5262
Misses ? 2652
Partials ? 356 |
9128415
to
4f4647e
Compare
I don't think this is necessarily caused by a particular issue in staking, this is always how we've handled validator updates, but if the TM side has changed (for the better!) we might need to update our end too. If a validator goes from zero power to nonzero power and back to zero power in the same block (through a few transactions), the validator will be passed back to Tendermint with zero power. In this case Tendermint used to do nothing (delete a key that wasn't there), but it looks like that behavior may have changed - https://github.com/tendermint/tendermint/blob/master/state/execution.go#L290 - which could be a problem here. |
@ValarDragon / @cwgoes . nice catch/Interesting- well we could always attempt to keep track of things on the state machine side too... we would just need to store/check the power at the previous height for each validator which is being sent as a tendermint update with 0 power - if the validator wasn't bonded at the previous height then we just don't send the update to Tendermint... seems simple enough - I'd propose we handle it this way - thoughts? |
That seems like a good fix to me |
I think this is fine. How do we track whether a validator was bonded at the start of the block, though? We can't use |
@cwgoes we can tease out whether the validator was bonded or not at the previous height using on |
Great, let's definitely get a fix for this in the next release. |
it'd be good to just work from this PR and change the merge base to develop |
Closing this in favor of #2238. |
This PR basically just demonstrates that there is a problem, and this causes simulation to fail.
Something is happening that is causing a non-existent validator to get deleted.
For Admin Use: