Skip to content

Implement checking of open ports and min proto versions in DKGs#3390

Merged
codablock merged 20 commits into
dashpay:developfrom
codablock:pr_pose_ban_bad_connections
Apr 2, 2020
Merged

Implement checking of open ports and min proto versions in DKGs#3390
codablock merged 20 commits into
dashpay:developfrom
codablock:pr_pose_ban_bad_connections

Conversation

@codablock

@codablock codablock commented Mar 30, 2020

Copy link
Copy Markdown

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 badMember field of QCOMPLAINT, 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.py is also refactored and enhanced to also test for open ports and min proto version banning.

@codablock codablock added P2P Some notable changes on p2p level backport-candidate-15.x labels Mar 30, 2020
@codablock codablock added this to the 16 milestone Mar 30, 2020
Comment thread src/llmq/quorums_dkgsession.cpp Outdated
Comment thread src/llmq/quorums_dkgsession.cpp Outdated
Comment thread src/masternode/activemasternode.cpp Outdated
Comment thread src/masternode/activemasternode.cpp Outdated
Comment thread src/masternode/masternode-sync.cpp Outdated
@codablock
codablock force-pushed the pr_pose_ban_bad_connections branch from 800d7c3 to 19e3e87 Compare March 31, 2020 05:26

@UdjinM6 UdjinM6 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 PastaPastaPasta left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK, I also seem to think 60% might be too low. 80% seems more appropriate to me

@codablock
codablock merged commit 1aba865 into dashpay:develop Apr 2, 2020
@codablock
codablock deleted the pr_pose_ban_bad_connections branch April 2, 2020 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2P Some notable changes on p2p level

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants