go-header icon indicating copy to clipboard operation
go-header copied to clipboard

p2p/peer_tracker: `peerTracker` scoring may be too aggressive

Open renaynay opened this issue 2 years ago • 2 comments

Running a node on mainnet has shown that even though I have good connectivity (~60 peers), my node's peerTracker only contains 3 tracked peers. It's likely due to aggressive peer scoring. We may need to be more lenient with it as it's better to have more trackedPeers that may have "mid-level" scores instead of only keeping the absolute best (which may be a very small pool).

We need to consider the scoring mechanism and adjust accordingly. We can only start doing this once we have a dashboard for the metrics that have just been implemented so we can make an informed decision.

renaynay avatar Oct 31 '23 19:10 renaynay

We can consider EWMA. It is used in the fintech world, but could be also helpful for us. We discussed this with @Wondertan some time ago

vgonkivs avatar Oct 31 '23 19:10 vgonkivs

We can add minAmount of peer to peer tracker. If amount of connect peers is less than minAmount it should not remove connected peers. It will solve original issue and should be quick to implement and give us time to select and implement smarter scoring arithmetic.

walldiss avatar Dec 19 '23 15:12 walldiss