Closed lidel closed 1 year ago
@alanshaw @lidel Can I work on this ?
@GavinDmello would be awesome, give it a try!
Check if we could add generic support for "resolving" multiaddrs in js-multiaddr – /dnsaddr
is an example of that. Check discussion at https://github.com/multiformats/js-multiaddr/issues/94
@lidel Thank you for the direction.
I was planning on adding handling directly in this repository and reusing the the dns objects in the core components.
I'll try asking on https://github.com/multiformats/js-multiaddr/issues/94 if anyone has started working on adding support.
Edit: I see @hacdias is going to be working on adding support for it. I'll use his work once he is done.
js-ipfs is being deprecated in favor of Helia. You can learn more about this deprecation and read the migration guide.
Please feel to reopen with any comments by 2023-06-02. We will do a final pass on reopened issues afterwards (see https://github.com/ipfs/js-ipfs/issues/4336).
This issue is most likely resolved in Helia, please try it out!
Type: Feature
Severity: Medium
Motivation
/dnsaddr
is like DNSLink, but for multiaddrs. It is a way of having static peer multiaddrs that do not hardcode PeerID and can point at multiple multiaddrs:/dnsaddr/bootstrap.libp2p.io
resolves to:/ip4/178.62.158.247/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd
/ip6/2a03:b0c0:0:1010::23:1001/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd
It is already supported by go-ipfs (https://github.com/ipfs/go-ipfs/issues/5522) and feels like "magic" mentioned in https://github.com/ipfs/js-ipfs/issues/1459 In js-ipfs, it could be used in default multiaddrs for things like dns-based bootstrap nodes or preload / delegate nodes, enabling us to scale transparently by adding more multiaddrs without the need for shipping patch release or changing client configs.
Problem
/dnsaddr
multiaddrs are not supported inswarm connect
/dnsaddr
entriesSteps to reproduce:
bootstrap.libp2p.io
has dnsaddr records with port and peerid:Try connecting to peer via dnsaddr:
Expected:
In case dnsaddr disappears from
bootstrap.libp2p.io
, alternative hostname for testing:ipfs.aergia.eu