Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

update quic-go to v0.20.0 #198

Merged
merged 1 commit into from
Mar 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/matrix.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
// v0.7.1 was never released in IPFS.
{ "go": "1.14", "commit": "v0.8.0", "retireBugBackwardsCompatiblityMode": true, "hasAcceptStreamBug": true },
{ "go": "1.15", "commit": "v0.8.0", "retireBugBackwardsCompatiblityMode": true, "hasAcceptStreamBug": true },
{ "go": "1.14", "commit": "HEAD", "retireBugBackwardsCompatiblityMode": true, "hasAcceptStreamBug": false },
{ "go": "1.15", "commit": "HEAD", "retireBugBackwardsCompatiblityMode": true, "hasAcceptStreamBug": false }
{ "go": "1.15", "commit": "HEAD", "retireBugBackwardsCompatiblityMode": true, "hasAcceptStreamBug": false },
{ "go": "1.16", "commit": "HEAD", "retireBugBackwardsCompatiblityMode": true, "hasAcceptStreamBug": false }
]
2 changes: 1 addition & 1 deletion .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
strategy:
matrix:
os: [ "ubuntu", "windows", "macos" ]
go: [ "1.14", "1.15" ]
go: [ "1.15.x", "1.16.x" ]
runs-on: ${{ matrix.os }}-latest
name: Unit tests (${{ matrix.os}}, Go ${{ matrix.go }})
steps:
Expand Down
4 changes: 2 additions & 2 deletions conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ var _ = Describe("Connection", func() {
// now allow the address and make sure the connection goes through
cg.EXPECT().InterceptAccept(gomock.Any()).Return(true)
cg.EXPECT().InterceptSecured(gomock.Any(), gomock.Any(), gomock.Any()).Return(true)
clientTransport.(*transport).clientConfig.HandshakeTimeout = 2 * time.Second
clientTransport.(*transport).clientConfig.HandshakeIdleTimeout = 2 * time.Second
conn, err = clientTransport.Dial(context.Background(), ln.Multiaddr(), serverID)
Expect(err).ToNot(HaveOccurred())
defer conn.Close()
Expand All @@ -221,7 +221,7 @@ var _ = Describe("Connection", func() {

// now allow the peerId and make sure the connection goes through
cg.EXPECT().InterceptSecured(gomock.Any(), gomock.Any(), gomock.Any()).Return(true)
clientTransport.(*transport).clientConfig.HandshakeTimeout = 2 * time.Second
clientTransport.(*transport).clientConfig.HandshakeIdleTimeout = 2 * time.Second
conn, err := clientTransport.Dial(context.Background(), ln.Multiaddr(), serverID)
Expect(err).ToNot(HaveOccurred())
conn.Close()
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
module github.com/libp2p/go-libp2p-quic-transport

go 1.14
go 1.15

require (
github.com/golang/mock v1.4.4
github.com/golang/mock v1.5.0
github.com/ipfs/go-log v1.0.4
github.com/klauspost/compress v1.11.7
github.com/libp2p/go-libp2p-core v0.8.0
github.com/libp2p/go-libp2p-tls v0.1.3
github.com/libp2p/go-netroute v0.1.3
github.com/lucas-clemente/quic-go v0.19.3
github.com/lucas-clemente/quic-go v0.20.0
github.com/minio/sha256-simd v0.1.1
github.com/multiformats/go-multiaddr v0.3.1
github.com/multiformats/go-multiaddr-fmt v0.1.0
Expand Down
55 changes: 15 additions & 40 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (l *listener) setupConn(sess quic.Session) (*conn, error) {
// Since we don't have any way of knowing which tls.Config was used though,
// we have to re-determine the peer's identity here.
// Therefore, this is expected to never fail.
remotePubKey, err := p2ptls.PubKeyFromCertChain(sess.ConnectionState().PeerCertificates)
remotePubKey, err := p2ptls.PubKeyFromCertChain(sess.ConnectionState().TLS.PeerCertificates)
if err != nil {
return nil, err
}
Expand Down
28 changes: 14 additions & 14 deletions mock_connection_gater_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ import (
"github.com/klauspost/compress/zstd"

"github.com/lucas-clemente/quic-go/logging"
"github.com/lucas-clemente/quic-go/metrics"
"github.com/lucas-clemente/quic-go/qlog"
)

var tracer logging.Tracer

func init() {
tracers := []logging.Tracer{metrics.NewTracer()}
tracers := []logging.Tracer{}
if qlogDir := os.Getenv("QLOGDIR"); len(qlogDir) > 0 {
if qlogger := initQlogger(qlogDir); qlogger != nil {
tracers = append(tracers, qlogger)
Expand Down
8 changes: 4 additions & 4 deletions transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ var log = logging.Logger("quic-transport")
var quicDialContext = quic.DialContext // so we can mock it in tests

var quicConfig = &quic.Config{
MaxIncomingStreams: 1000,
MaxIncomingUniStreams: -1, // disable unidirectional streams
MaxReceiveStreamFlowControlWindow: 10 * (1 << 20), // 10 MB
MaxReceiveConnectionFlowControlWindow: 15 * (1 << 20), // 15 MB
MaxIncomingStreams: 1000,
MaxIncomingUniStreams: -1, // disable unidirectional streams
MaxStreamReceiveWindow: 10 * (1 << 20), // 10 MB
MaxConnectionReceiveWindow: 15 * (1 << 20), // 15 MB
AcceptToken: func(clientAddr net.Addr, _ *quic.Token) bool {
// TODO(#6): require source address validation when under load
return true
Expand Down