Open kumavis opened 5 years ago
for reference my peers are usually blacklisted for "no transport for peer"
Since the network is still fairly unstable having peers in the dht that are no longer dialable is going to be an issue we need to address. The blacklisting is likely due to this.
The provide shouldn't ignore the errors, I think it should continue trying further peers until it hits kValue
(20) peers. Also, if we fail to connect to the peer they should probably get removed from the table or at least penalized up to some threshold before removal.
If we don't provide to enough peers we risk findProviders having a higher failure rate for other peers.
Right now getClosestProviders
returns only kValue
peers. It would be great to be able to continue to pull from it until we've messaged enough peers.
was also encountering this here https://github.com/libp2p/js-libp2p-kad-dht/blob/ddf80fed9ca7e8b1ec096f3160535aa3fdb45b50/src/private.js#L559
reproduction / error flow
async/each
over peers and callthis.network.sendMessage(peer, msg, cb)
async/each
to end with errorhttps://github.com/libp2p/js-libp2p-kad-dht/blob/9db17eb85cc9dc011b7aa2b710576a00ef7fda9e/src/index.js#L530-L542
suggestions: