Issue: libp2p/go-libp2p#623 Spec: https://github.com/libp2p/specs/blob/master/discovery/mdns.md
The current MDNS discovery mechanism implemented in go:
- Does not conform to the above MDNS spec.
- Does not support transports other than TCP (due to limitations of the current protocol).
- Is filled with race conditions and other bugs (see the linked issue above) due to issues with the underlying MDNS implementation.
The value is just a mirror of the motivation:
- Replacing the underlying MDNS library (note: not with https://github.com/grandcat/zeroconf, that library doesn't fix the relevant bugs) will fix some data races (the only known data races in go-libp2p).
- Implementing the new protocol will improve interop between go-libp2p (which only implements the old, outdated protocol) and rust-libp2p (which only implements the new protocol).
- Implementing the new protocol will add support for discovering QUIC addresses (the current protocol only supports TCP).
- go/rust libp2p interop on local networks isn't complete.
- go-libp2p has a serious race condition when MDNS is enabled and can't be run with the race detector enabled.
The module must:
- Not trigger the race detector.
- Implement the new spec.
- Interoperate with js-libp2p and rust-libp2p.
Non-issues:
- The module does not have to work with the current go-libp2p MDNS implementation. We can just pull in multiple modules for a transition period.
ETHBerlinZwei, Protocol Labs.