dennis-tra / nebula

🌌 A network agnostic DHT crawler, monitor, and measurement tool that exposes timely information about DHT networks.
Apache License 2.0
294 stars 30 forks source link

fix: store listen addresses as reported by identify #39

Closed dennis-tra closed 1 year ago

dennis-tra commented 1 year ago

When crawling the DHT I’m constantly issuing FIND_NODE RPCs. The response contains a list of peerIDs and also often the multi addresses. If the peer that returns the response is on an older version that doesn’t support, e.g., /quic-v1, the list of multi addresses won’t contain such addresses although the returned peer might actually support it.

The list I’m currently tracking with Nebula is the one I got handed by the other peer.

With this PR, I adjusted the crawler to await the Identify exchange and store the Multiaddresses that the peer actually reports to listen on.