From 4294a5fb11b497c156ccb353fd0d0b6a49f2eb3c Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Fri, 31 Aug 2018 14:53:07 -0700 Subject: [PATCH 1/3] explicitly enable the default transports Otherwise, enabling the QUIC transport will disable the default ones fixes #5416 License: MIT Signed-off-by: Steven Allen --- core/core.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/core.go b/core/core.go index 9615f47e49b..91238f7f7d1 100644 --- a/core/core.go +++ b/core/core.go @@ -249,6 +249,9 @@ func (n *IpfsNode) startOnlineServices(ctx context.Context, routingOption Routin libp2pOpts = append(libp2pOpts, libp2p.EnableRelay(opts...)) } + // explicitly enable the default transports + libp2pOpts = append(libp2pOpts, libp2p.DefaultTransports) + if cfg.Experimental.QUIC { libp2pOpts = append(libp2pOpts, libp2p.Transport(quic.NewTransport)) } From 3bc47d36fc89d55f76ff9dde980eae2451bc1c15 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Fri, 31 Aug 2018 14:53:56 -0700 Subject: [PATCH 2/3] disable the default listen addrs We explicitly setup listeners but we do this *after* constructing the node. fixes #5387 License: MIT Signed-off-by: Steven Allen --- core/core.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/core.go b/core/core.go index 91238f7f7d1..4c46d7dcff5 100644 --- a/core/core.go +++ b/core/core.go @@ -249,6 +249,9 @@ func (n *IpfsNode) startOnlineServices(ctx context.Context, routingOption Routin libp2pOpts = append(libp2pOpts, libp2p.EnableRelay(opts...)) } + // disable the default listen addrs + libp2pOpts = append(libp2pOpts, libp2p.NoListenAddrs) + // explicitly enable the default transports libp2pOpts = append(libp2pOpts, libp2p.DefaultTransports) From 21befd5f531e3518f235336c24e3f4f627e71cef Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Fri, 31 Aug 2018 15:13:45 -0700 Subject: [PATCH 3/3] run the twonode test with QUIC enabled No reason not to and it would have caught #5416 License: MIT Signed-off-by: Steven Allen --- test/sharness/t0125-twonode.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/sharness/t0125-twonode.sh b/test/sharness/t0125-twonode.sh index 938e7e99dea..b0032f8b16f 100755 --- a/test/sharness/t0125-twonode.sh +++ b/test/sharness/t0125-twonode.sh @@ -89,6 +89,12 @@ test_expect_success "set up tcp testbed" ' iptb init -n 2 -p 0 -f --bootstrap=none ' +# Enable quic but don't use it yet. +test_expect_success "enable QUIC experiment" ' + ipfsi 0 config --json Experimental.QUIC true && + ipfsi 1 config --json Experimental.QUIC true +' + # test multiplex muxer echo "Running advanced tests with mplex" export LIBP2P_MUX_PREFS="/mplex/6.7.0" @@ -101,11 +107,6 @@ run_advanced_test # test QUIC echo "Running advanced tests over QUIC" -test_expect_success "enable QUIC experiment" ' - ipfsi 0 config --json Experimental.QUIC true && - ipfsi 1 config --json Experimental.QUIC true -' - addr1='"[\"/ip4/127.0.0.1/udp/0/quic/\"]"' addr2='"[\"/ip4/127.0.0.1/udp/0/quic/\"]"' test_expect_success "add QUIC swarm addresses" '