From 878d8fe2838146f44119cd3249efe53dcfdffcf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Kripalani?= Date: Thu, 15 Aug 2019 13:56:47 +0100 Subject: [PATCH] proposal 011: implement mDNS in Go and JS. --- 011-mdns-go-js.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 011-mdns-go-js.md diff --git a/011-mdns-go-js.md b/011-mdns-go-js.md new file mode 100644 index 0000000..56311bb --- /dev/null +++ b/011-mdns-go-js.md @@ -0,0 +1,47 @@ +# Implement MDNS discovery in Go and JS per the new spec + +## Motivation and context + +Issue: https://github.com/libp2p/go-libp2p/issues/623 +Spec: https://github.com/libp2p/specs/blob/master/discovery/mdns.md + +The current MDNS discovery mechanism implemented in go: + +1. Does not conform to the above MDNS spec. +2. Does not support transports other than TCP (due to limitations of the current protocol). +3. Is filled with race conditions and other bugs (see the linked issue above) due to issues with the underlying MDNS implementation. + +## Value + +### Benefits (if addressed) + +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). + +### Risks (if not addressed) + +* 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. + +## Expected output and constraints + +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. + +## Design/implementation notes + +## Potential funders + + + +Protocol Labs. \ No newline at end of file