Implement checking of open ports and min proto versions in DKGs#3390
Merged
codablock merged 20 commits intoApr 2, 2020
Conversation
UdjinM6
requested changes
Mar 31, 2020
This kept conflicting with the way we use mocktime and causes many DKG failures.
This was intended to test for "not self.check_banned"
codablock
force-pushed
the
pr_pose_ban_bad_connections
branch
from
March 31, 2020 05:26
800d7c3 to
19e3e87
Compare
UdjinM6
approved these changes
Apr 1, 2020
UdjinM6
left a comment
There was a problem hiding this comment.
Looks good. My main concern is 60% threshold which could be way too low, but let's try it on testnet and see :)
utACK
PastaPastaPasta
approved these changes
Apr 1, 2020
PastaPastaPasta
left a comment
Member
There was a problem hiding this comment.
utACK, I also seem to think 60% might be too low. 80% seems more appropriate to me
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With this PR, members of LLMQs will check all other members for open ports and minimum protocol versions while in DKG. These checks are based on #3380, which probes all members for open ports already.
When such a check fails, members will vote on the failed member to be bad. They will re-use the already existing
badMemberfield ofQCOMPLAINT, which makes the code backward compatible with older nodes.The idea of the min version check is that each member will always vote on other members to be bad when the version is lower then
MIN_MASTERNODE_PROTO_VERSION. This won't have any effect until enough (dkgBadVotesThreshold) members vote for the same member to be bad. When enough members did the vote, premature commitments will mark the failed member as bad.This means that masternodes will start to get PoSe punished when 60% of the network has upgraded to the latest version. It will start to sporadically punish/ban and get more often while more masternodes upgrade.
This PR currently also contains a fix for the same failures as fixed by #3388. I'll remove that part from this PR when #3388 gets merged.llmq-simplepose.pyis also refactored and enhanced to also test for open ports and min proto version banning.