Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Announce multiple transports #4

Open
daviddias opened this issue Sep 24, 2015 · 8 comments
Open

Announce multiple transports #4

daviddias opened this issue Sep 24, 2015 · 8 comments
Labels
exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked

Comments

@daviddias
Copy link
Member

When discovery was designed, it was assumed that an IPFS node would be announcing only one transport at a time and so, the mDNS query responses are just announcing one of the multiaddr. We need to announce all of them :) Specially cause even one transport can have several multiaddr:

https://github.com/diasdavid/node-libp2p-mdns-discovery/blob/master/src/index.js#L125-L190

@daviddias daviddias added the help wanted Seeking public contribution on this issue label Sep 24, 2015
@daviddias daviddias added the status/ready Ready to be worked label Dec 5, 2016
@daviddias daviddias self-assigned this Dec 5, 2016
@daviddias
Copy link
Member Author

@lgierth @whyrusleeping thoughts here?

@daviddias daviddias removed the help wanted Seeking public contribution on this issue label Jan 28, 2017
@daviddias daviddias added exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue labels Jul 8, 2017
@richardschneider
Copy link
Contributor

Responses are announcing all TCP address, which is what mdns allows.

@diasdavid Can we close this?

@daviddias
Copy link
Member Author

@richardschneider mdns doesn't let us announce transports such as WebSockets?

@richardschneider
Copy link
Contributor

It's because mdns uses DNS records and only ip4/ip6 is supported by A and AAAA records.

However, we are free to define what's in the TXT record. Currently we just add the public ID. However, we can use a key-value, which is recommended. Something like

id=Qm...
ma=/..../ws/ipfs/Qm...
ma=/ip4/127.0.1/tcp/4001/ipfs/Qm

@ghost
Copy link

ghost commented Jan 31, 2018

Ideally put dnsaddrs in there -- dnsaddr=/ip4/...

https://github.com/multiformats/go-multiaddr-dns

@richardschneider
Copy link
Contributor

richardschneider commented Jan 31, 2018

Yes, we can do the above.

But remember MDNS is used to discover an IPFS daemon over UPD. If its discovered then we should be able to use an IPv4/IPv6 TCP port to make a connection.

Also, since MDNS uses UPD, the response payload should be as small as possible.

KISS

@richardschneider
Copy link
Contributor

I must admit, I like the idea of changing the TXT record to contain key pairs. Even if we just change it for id=Qm.... This allows future enhancements to make non-breaking additions,

@whyrusleeping
Copy link

The keypairs idea is nice.

@daviddias daviddias removed their assignment Feb 5, 2018
@daviddias daviddias added the P2 Medium: Good to have, but can wait until someone steps up label Feb 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked
Projects
None yet
Development

No branches or pull requests

4 participants