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

Core: Testnet uses max 15 validators #123

Merged
merged 4 commits into from
Jan 29, 2019

Conversation

orogvany
Copy link
Collaborator

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.

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.
mid selection

This allows us to unblock testnet
@orogvany
Copy link
Collaborator Author

This should fix the stuck testnet now, so after we get CR, will make RC2 release!

@orogvany orogvany requested a review from semuxgo January 27, 2019 20:42
@orogvany orogvany merged commit ccb9a3b into semuxproject:develop Jan 29, 2019
@orogvany orogvany deleted the testnet_validators branch January 29, 2019 16:49
public int getNumberOfValidators(long number) {

// adjust number down to unstick testnet to more reasonable max
if (number <= 751638) {
Copy link
Contributor

@cryptokat cryptokat Feb 1, 2019

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:

// [6] update validator set
if (number % config.getValidatorUpdateInterval() == 0) {
updateValidators(block.getNumber());
}

Copy link
Contributor

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.

@orogvany
Copy link
Collaborator Author

orogvany commented Feb 1, 2019

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

@semuxgo semuxgo mentioned this pull request Apr 21, 2019
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

Successfully merging this pull request may close these issues.

3 participants