Skip to content
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

Validator status and voting power not updated in some cases #666

Open
max-hontar opened this issue Oct 16, 2023 · 0 comments
Open

Validator status and voting power not updated in some cases #666

max-hontar opened this issue Oct 16, 2023 · 0 comments
Assignees

Comments

@max-hontar
Copy link

Bug description

After latest changes in PR #652 in some cases validator state updates not working. When validator leave from active validators set its state and voting power not updated in DB.

Steps to reproduce

To reproduce bug - just remove all delegation (or self-delegation) below min - so validator switch to status "unbonding". But this state not reflected in DB - voting power same as last known before change, same as status.

Expected behavior

After switch validator status to "unbonding" state - its voting power should update to "0" and status in DB also should be "unbonding" (BondStatus = 2)

Problem source (as I got from code):
In staking module this updates handled by function UpdateValidatorStatuses(), its don't have parameters and inside call GetValidatorsWithStatus(block.Height, stakingtypes.Bonded.String()) - so it takes only "bonded" validators and update status & voting power only for them!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants