Skip to content

Let all LLMQ members connect to each other instead of only a few ones#3380

Merged
codablock merged 13 commits into
dashpay:developfrom
codablock:pr_all_mns_connected
Mar 27, 2020
Merged

Let all LLMQ members connect to each other instead of only a few ones#3380
codablock merged 13 commits into
dashpay:developfrom
codablock:pr_all_mns_connected

Conversation

@codablock

Copy link
Copy Markdown

This PR implements a new way of intra-quorum connection handling, which is activated with the new spork SPORK_21_QUORUM_ALL_CONNECTED. The new code should not affect testnet or devnets in any way, until we actually enable the spork. Connecting to all members will later be used to implement a new way of LLMQ signature recovery, which avoids propagating all shares to all members and thus reduces load a lot.

This PR also implements "probing" of masternodes. While each member must have a connection to each other member, it's not necessary for all members to actually connect to all other members. This is because only one of a pair of two MNs need to initiate the connection while the other one can wait for an incoming connection. "probing" is done in the case where a MN doesn't really need an outbound connection, but still wants to verify that the other side has its port open. This is done by initiating a short lived connection, waiting for MNAUTH to succeed and then disconnecting again.

Each probe (and normal outgoing connection) is tracked in the masternode meta info (can be seen in protx list registered 1), so that we can verify in other places when we had the last successful outbound connection to the masternode. This will later be used by DKGs to vote on offline and old-proto-version members.

@thephez

thephez commented Mar 26, 2020

Copy link
Copy Markdown
Collaborator

Probably should update the LLMQ DIP once the revisions are complete.

@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 👍 One suggestion, see below.

EDIT: oh and #include "..."->#include <...>, so two suggestions :)

Comment thread src/rpc/rpcquorums.cpp Outdated
@codablock
codablock force-pushed the pr_all_mns_connected branch from ea8e885 to 1673a59 Compare March 26, 2020 15:27
Comment thread src/llmq/quorums_utils.cpp Outdated
@codablock
codablock force-pushed the pr_all_mns_connected branch from c8bf885 to a09e361 Compare March 27, 2020 14:12

@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.

👍

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 👍

@PastaPastaPasta

Copy link
Copy Markdown
Member

Also this should be labeled at least RPC

@codablock codablock added P2P Some notable changes on p2p level RPC Some notable changes to RPC params/behaviour/descriptions labels Mar 27, 2020
@codablock
codablock merged commit a5a3e51 into dashpay:develop Mar 27, 2020
@codablock
codablock deleted the pr_all_mns_connected branch March 27, 2020 16:07
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 RPC Some notable changes to RPC params/behaviour/descriptions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants