js-libp2p icon indicating copy to clipboard operation
js-libp2p copied to clipboard

Libp2p dialer should try to find multiaddrs for a given peer if it does not know any

Open vasco-santos opened this issue 4 years ago • 0 comments

  • Version: N/A
  • Platform: N/A
  • Subsystem: Dialer

Type: Enhancenment

Description:

We currently recommend users to do libp2p.dial(peerId) to dial peers. This will obviously fail if multiaddrs for the given peer were not previously added to the addressBook (either manually, or via a discovery mechanism/DHT/rendezvous...)

If libp2p has a peer-routing module, it should perform a lookup in order to try to find multiaddrs for the given peer, before simply failing with "no available multiaddrs for the given peer"

Context: https://github.com/libp2p/js-libp2p-interfaces/issues/85

vasco-santos avatar Mar 11 '21 17:03 vasco-santos