After a discussion with folks at IPFS Camp (end of June), it has become clear that we need to start exploring using the QUIC transport protocol layer in our libp2p components. This, in theory, is a pretty simple change/update. However, because we are using ED25519 keys for our IPFS peers, things get tricky. This issue will document those issues, and hopefully outline a reasonable path towards adoption of QUIC.
First, why add QUIC support? Apparently it comes with easier NAT hole punching, better handling of network changes (i.e., from lte to wifi and back again), and generally a more consistent experience, particularly on mobile.
Secondly, what is the issue? Simply stated, a lack of support for ed25519 keys. Recently, Golang has added support for Ed25519 keys to the standard library. This will make it into the 1.3 release. This is great news, because it means things like crypto/lts, crypto/x500, etc will support Ed25519 out of the box. In fact, there is already a PR to add this support via a Golang upgrade.
The downside here, as stated in comments on that PR, is mainly that:
its not really great until after 1.13 is released (which is very soon)
this won't work with other nodes that haven't updated to a libp2p release compiled with Go 1.13 (and therefore won't be able to complete the handshake)
It might be ok to use the go1.3 version if we also continue to support our current transports... which would make our nodes backward compatible with the rest of the network, but only compatible over quic with our (or other) peers that have made the upgrade.
So to summarize: quic transport is a really good idea... but given we are using ed25519 keys, we either a) wait for a libp2p generic fix (best), b) wait for go v1.13 to be released (easiest), or c) do it ourselves using a custom libp2p-quic implementation (hardest).
After a discussion with folks at IPFS Camp (end of June), it has become clear that we need to start exploring using the QUIC transport protocol layer in our libp2p components. This, in theory, is a pretty simple change/update. However, because we are using ED25519 keys for our IPFS peers, things get tricky. This issue will document those issues, and hopefully outline a reasonable path towards adoption of QUIC.
First, why add QUIC support? Apparently it comes with easier NAT hole punching, better handling of network changes (i.e., from lte to wifi and back again), and generally a more consistent experience, particularly on mobile.
Secondly, what is the issue? Simply stated, a lack of support for ed25519 keys. Recently, Golang has added support for Ed25519 keys to the standard library. This will make it into the 1.3 release. This is great news, because it means things like
crypto/lts
,crypto/x500
, etc will support Ed25519 out of the box. In fact, there is already a PR to add this support via a Golang upgrade.The downside here, as stated in comments on that PR, is mainly that:
It might be ok to use the go1.3 version if we also continue to support our current transports... which would make our nodes backward compatible with the rest of the network, but only compatible over quic with our (or other) peers that have made the upgrade.
So to summarize: quic transport is a really good idea... but given we are using ed25519 keys, we either a) wait for a libp2p generic fix (best), b) wait for go v1.13 to be released (easiest), or c) do it ourselves using a custom libp2p-quic implementation (hardest).