-
Notifications
You must be signed in to change notification settings - Fork 31
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
Core: Testnet uses max 15 validators #123
Conversation
Testnet keeps dying because of dead validators. Let's limit the number of validators to 15 such that we can vote up alive validators to keep testnet healthy. As testnet is already hung, do not need hardfork for this.
validators fixes issue submitted by @honeycrypto
mid selection This allows us to unblock testnet
This should fix the stuck testnet now, so after we get CR, will make RC2 release! |
public int getNumberOfValidators(long number) { | ||
|
||
// adjust number down to unstick testnet to more reasonable max | ||
if (number <= 751638) { |
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.
The hard capped validators won't be written into the database since the validator set in the database doesn't get updated until block 751800. As a result clients who are not participating in SemuxBFT won't be able to sync with the validator nodes seeing the error of Not enough votes, needs 2/3+
. See:
semux-core/src/main/java/org/semux/core/BlockchainImpl.java
Lines 381 to 384 in 40a00cc
// [6] update validator set | |
if (number % config.getValidatorUpdateInterval() == 0) { | |
updateValidators(block.getNumber()); | |
} |
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.
I managed to resume my client using a workaround by calling updateValidators(751600)
in the constructor of BlockchainImpl
. A proper solution would be performing a database upgrade.
I noticed this last night too. I have a fix on my semux for under fix_testnet. Can release as a 1.5.2 for those stuck clients in testnet Wondering how we can make catching this or testing these types of scenarios locally. Need a unit test framework that can have n number of nodes as system gets complex fast |
Testnet keeps dying because of dead validators.
Let's limit the number of validators to 15 such that we can
vote up alive validators to keep testnet healthy.
As testnet is already hung, do not need hardfork for this.