From be171d5e3c6878ce2d97c25747fb101e1cfbb2ab Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sat, 11 Jul 2020 10:23:42 +0700 Subject: [PATCH] update QUIC, enable the RetireBugBackwardsCompatibilityMode --- core/node/libp2p/transport.go | 8 ++++++++ go.mod | 3 ++- go.sum | 8 ++++---- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/core/node/libp2p/transport.go b/core/node/libp2p/transport.go index c5112e9c0b8..6140b739dce 100644 --- a/core/node/libp2p/transport.go +++ b/core/node/libp2p/transport.go @@ -9,10 +9,18 @@ import ( libp2pquic "github.com/libp2p/go-libp2p-quic-transport" tcp "github.com/libp2p/go-tcp-transport" websocket "github.com/libp2p/go-ws-transport" + quic "github.com/lucas-clemente/quic-go" "go.uber.org/fx" ) +// See https://github.com/ipfs/go-ipfs/issues/7526 and +// https://github.com/lucas-clemente/quic-go/releases/tag/v0.17.3. +// TODO: remove this once the network has upgraded to > v0.6.0. +func init() { + quic.RetireBugBackwardsCompatibilityMode = true +} + func Transports(tptConfig config.Transports) interface{} { return func(pnet struct { fx.In diff --git a/go.mod b/go.mod index d1009a87969..fa9dc16a0dd 100644 --- a/go.mod +++ b/go.mod @@ -74,7 +74,7 @@ require ( github.com/libp2p/go-libp2p-peerstore v0.2.6 github.com/libp2p/go-libp2p-pubsub v0.3.1 github.com/libp2p/go-libp2p-pubsub-router v0.3.0 - github.com/libp2p/go-libp2p-quic-transport v0.7.0 + github.com/libp2p/go-libp2p-quic-transport v0.7.1 github.com/libp2p/go-libp2p-record v0.1.3 github.com/libp2p/go-libp2p-routing-helpers v0.2.3 github.com/libp2p/go-libp2p-secio v0.2.2 @@ -85,6 +85,7 @@ require ( github.com/libp2p/go-socket-activation v0.0.2 github.com/libp2p/go-tcp-transport v0.2.0 github.com/libp2p/go-ws-transport v0.3.1 + github.com/lucas-clemente/quic-go v0.17.3 github.com/mattn/go-runewidth v0.0.9 // indirect github.com/miekg/dns v1.1.29 // indirect github.com/mitchellh/go-homedir v1.1.0 diff --git a/go.sum b/go.sum index 8a418b298f1..6662a335dbc 100644 --- a/go.sum +++ b/go.sum @@ -716,8 +716,8 @@ github.com/libp2p/go-libp2p-pubsub v0.3.1/go.mod h1:TxPOBuo1FPdsTjFnv+FGZbNbWYsp github.com/libp2p/go-libp2p-pubsub-router v0.3.0 h1:ghpHApTMXN+aZ+InYvpJa/ckBW4orypzNI0aWQDth3s= github.com/libp2p/go-libp2p-pubsub-router v0.3.0/go.mod h1:6kZb1gGV1yGzXTfyNsi4p+hyt1JnA1OMGHeExTOJR3A= github.com/libp2p/go-libp2p-quic-transport v0.3.7/go.mod h1:Kr4aDtnfHHNeENn5J+sZIVc+t8HpQn9W6BOxhVGHbgI= -github.com/libp2p/go-libp2p-quic-transport v0.7.0 h1:sDfgsgxfQIHfjE7GjmasoNxqfYYEtERLqBxt9J7pocQ= -github.com/libp2p/go-libp2p-quic-transport v0.7.0/go.mod h1:HK9llw8/wvidGF+KyVVvdumhJ3wE/0jlewfHd13YF6Q= +github.com/libp2p/go-libp2p-quic-transport v0.7.1 h1:X6Ond9GANspXpgwJlSR9yxcMMD6SLBnGKRtwjBG5awc= +github.com/libp2p/go-libp2p-quic-transport v0.7.1/go.mod h1:TD31to4E5exogR/GWHClXCfkktigjAl5rXSt7HoxNvY= github.com/libp2p/go-libp2p-record v0.0.1/go.mod h1:grzqg263Rug/sRex85QrDOLntdFAymLDLm7lxMgU79Q= github.com/libp2p/go-libp2p-record v0.1.0/go.mod h1:ujNc8iuE5dlKWVy6wuL6dd58t0n7xI4hAIl8pE6wu5Q= github.com/libp2p/go-libp2p-record v0.1.2 h1:M50VKzWnmUrk/M5/Dz99qO9Xh4vs8ijsK+7HkJvRP+0= @@ -869,8 +869,8 @@ github.com/libp2p/go-yamux v1.3.7 h1:v40A1eSPJDIZwz2AvrV3cxpTZEGDP11QJbukmEhYyQI github.com/libp2p/go-yamux v1.3.7/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= github.com/lucas-clemente/quic-go v0.15.7 h1:Pu7To5/G9JoP1mwlrcIvfV8ByPBlCzif3MCl8+1W83I= github.com/lucas-clemente/quic-go v0.15.7/go.mod h1:Myi1OyS0FOjL3not4BxT7KN29bRkcMUV5JVVFLKtDp8= -github.com/lucas-clemente/quic-go v0.17.2 h1:4iQInIuNQkPNZmsy9rCnwuOzpH0qGnDo4jn0QfI/qE4= -github.com/lucas-clemente/quic-go v0.17.2/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= +github.com/lucas-clemente/quic-go v0.17.3 h1:jMX/MmDNCljfisgMmPGUcBJ+zUh9w3d3ia4YJjYS3TM= +github.com/lucas-clemente/quic-go v0.17.3/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic=