You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when we run our sync code, we start two supervisors: ExWire.PeerSupervisor and ExWire.TCP.InboundConnectionsSupervisor. The latter is used for inbound connections, which isn't heavily supported right now. For ExWire.PeerSupervisor, when we're running discovery mode, we connect to peers as they are discovered until we reach a certain count of max peers (currently hard-coded). We don't try to connect to other peers when our connected peers drop, and again, we ignore any inbound connections. This is pretty poor behavior.
This issue is to improve peer connection management. It should do a variety of tasks:
Keep track of all peers (discovered by the discovery protocol, inbound or from bootnodes / reserved peers), even if we decide not to connect. This acts as a pool of nodes we might connect to.
Connect to good peers. This might be from the Kademlia distance formula, or maybe nodes we've connected to in the past, or maybe based on capabilities (e.g. connect, check the caps, and drop the node if it's not useful).
Keep track of dropped connections (maybe a peer disconnected from us) and connect to new nodes when this happens. We should (probably) not reconnect to a peer after it asks to disconnect, but we should keep that peer if we just had a transport error.
This will require a good amount of work, but it's vital to getting a healthy node up and running.
The text was updated successfully, but these errors were encountered:
* WIP - linking to connections and determening cause
* WIP - testing notification and kademlia route
* fixing test because of new peer supervisor interface
* remove vscode folder ignore
* code style and format
* adding is outbound to log
Peer rating and reputation system:
The idea is that a rating consist of:
Capabilities of a peer (weighted if they mach ours)
P2p version that's being broadcasted (weighted if same or above ours)
Arithmetic mean of the amount of time a connection was established and the count of exchanged messages (that should give us an idea of latency and usefulness of a peer)
Currently when we run our sync code, we start two supervisors:
ExWire.PeerSupervisor
andExWire.TCP.InboundConnectionsSupervisor
. The latter is used for inbound connections, which isn't heavily supported right now. ForExWire.PeerSupervisor
, when we're running discovery mode, we connect to peers as they are discovered until we reach a certain count of max peers (currently hard-coded). We don't try to connect to other peers when our connected peers drop, and again, we ignore any inbound connections. This is pretty poor behavior.This issue is to improve peer connection management. It should do a variety of tasks:
This will require a good amount of work, but it's vital to getting a healthy node up and running.
The text was updated successfully, but these errors were encountered: