convex
convex copied to clipboard
New local peer joining a local network does not get any messages
When a local cluster is started up, and then a new peer created and started. The following steps occur:
- The new peer gets 5 connections to the local peers, and the first set of beliefs are synced with the new peer.
2 The new local peer then updates it's URL via the
set-peerfunction, and so sends a new belief. - The local cluster then receives the new belief and updates the consensus.
- The local cluster sync with each other over the new consensus.
- The new local peer does not get the new consensus and so starts to do step #2 again.
- This continues on looping from step 3 to 5.
This is happening because the new peer only as 5 one way connections to the local peer cluster. While the cluster is only connected to themselves. None of the cluster peers are connected to the new local joined peer.
Not sure how to fix this ...
- Get the new local peer to request one of the cluster peers to connect to the new peer.
- Increase the random connections across the peers.
- Broadcast messages down the receive connections as well as the send connections to the peers.
Suggested mitigations:
- New local Peer should probably keep requesting status from another random Peer to get an updated belief every second if it hasn't received any other Belief updates
- Increase default number of outbound connections to 20, but this should be a config variable anyway
- Peers should randomly "drop" outgoing connections now and again so that they can pick up connections with new Peers (assuming stake available etc.)
Note that there shouldn't be a way to "force" a good peer to make an outgoing connection.