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

valset: Never allow empty validator set #64

Open
ethanfrey opened this issue Feb 2, 2022 · 1 comment
Open

valset: Never allow empty validator set #64

ethanfrey opened this issue Feb 2, 2022 · 1 comment

Comments

@ethanfrey
Copy link
Contributor

ethanfrey commented Feb 2, 2022

This happened in a bug that crashed testnet 3. It may also happen on a testnet if everyone unstakes at once.

Let's add a quick sanity check, so if calculate_validators returns an empty set, we do not apply it (apply no diff). It should make some log message so we realise this case rather than just ignore it.

Open to thoughts on how to best handle it (some backup validator to use?) but we should ensure this state never occurs.

@hashedone
Copy link
Collaborator

Maybe just leave the old validator set in such case? And emit some diagnostic event about such case - we could have tool listening to such events to react in the case as it is something to react on. I know it may prolong the age of slashed validators, and ones which didn't pay for being them, but it still seems like less dangerous than empty validators set.

@ethanfrey ethanfrey added this to the 0.7.0 Dry Run Net milestone Feb 3, 2022
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