]> git.feebdaed.xyz Git - 0xmirror/quic-go.git/log
0xmirror/quic-go.git
2 months agofix qlogging of the short header payload length (#5365)
Marten Seemann [Thu, 9 Oct 2025 12:17:55 +0000 (20:17 +0800)]
fix qlogging of the short header payload length (#5365)

2 months agoqlog: privatize Encode methods of non-Event structs (#5364)
Marten Seemann [Thu, 9 Oct 2025 12:12:19 +0000 (20:12 +0800)]
qlog: privatize Encode methods of non-Event structs (#5364)

2 months agoackhandler: fix qlogging of alarm timer expiration time (#5363)
Marten Seemann [Thu, 9 Oct 2025 08:21:06 +0000 (16:21 +0800)]
ackhandler: fix qlogging of alarm timer expiration time (#5363)

2 months agoqlogwriter: pass the event time to Event.Encode (#5362)
Marten Seemann [Thu, 9 Oct 2025 05:57:14 +0000 (13:57 +0800)]
qlogwriter: pass the event time to Event.Encode (#5362)

This is needed for events such as recovery:loss_timer_updated, which
contain the timer expiration timestamp encoded as a difference from the
event time.

2 months agoqlogwriter: add support for event_schemas in the trace header (#5361)
Marten Seemann [Thu, 9 Oct 2025 04:07:23 +0000 (12:07 +0800)]
qlogwriter: add support for event_schemas in the trace header (#5361)

2 months agoqlogwriter: implement the draft-12 trace header (#5360)
Marten Seemann [Wed, 8 Oct 2025 14:21:35 +0000 (22:21 +0800)]
qlogwriter: implement the draft-12 trace header (#5360)

2 months agoqlog: split serializiation and event definitions, remove logging abstraction (#5356)
Marten Seemann [Wed, 8 Oct 2025 03:53:02 +0000 (11:53 +0800)]
qlog: split serializiation and event definitions, remove logging abstraction (#5356)

* qlog: implement a Trace and a Writer struct

* qlog: rename Trace to FileSeq

* split qlog trace writer and QUIC qlog events into separate packages

* use the new qlog.Recorder instead of the logging.ConnectionTracer

2 months agouse synctest in more connection tests (#5357)
Marten Seemann [Mon, 6 Oct 2025 12:49:04 +0000 (20:49 +0800)]
use synctest in more connection tests (#5357)

No functional change expected.

2 months agoci: remove 386 (32 bit x86) (#5352)
Marco Munizaga [Mon, 6 Oct 2025 05:23:09 +0000 (22:23 -0700)]
ci: remove 386 (32 bit x86) (#5352)

The last 386 cpu was from 20 years ago (Pentium 4)

2 months agoqlog: implement a minimal jsontext-like JSON encoder (#5353)
Marten Seemann [Mon, 6 Oct 2025 04:48:40 +0000 (12:48 +0800)]
qlog: implement a minimal jsontext-like JSON encoder (#5353)

* qlog: use fork of encoding/json/jsontext instead of unmaintained gojay

* implement a minimal jsontext-compatible encoder

* qlogtext: improve fuzz test

* qlog: simplify JSON encoding error handling

* qlog: make use of jsontext.Bool

2 months agoackhandler: track lost packets and detect spurious losses (#5355)
Marten Seemann [Fri, 3 Oct 2025 07:59:50 +0000 (15:59 +0800)]
ackhandler: track lost packets and detect spurious losses (#5355)

* ackhandler: implement a lost packet tracker

* logging: add ConnectionTracer.DetectedSpuriousLoss event

* ackhandler: detect spurious losses

* qlog: add support for logging spurious packet loss

* ackhandler: delete lost packets after detecting spurios loss

* guard against slice index underflow

2 months agofix missing tracing of restored transport parameters (#5349)
Marten Seemann [Fri, 3 Oct 2025 06:53:20 +0000 (14:53 +0800)]
fix missing tracing of restored transport parameters (#5349)

2 months agoprotocol: optimize ConnectionID.String (#5351)
Marten Seemann [Fri, 3 Oct 2025 06:27:39 +0000 (14:27 +0800)]
protocol: optimize ConnectionID.String (#5351)

This function is used by qlog, so it should be fast.

2 months agodrop initial keys when the handshake is confirmed (#5354)
Marten Seemann [Fri, 3 Oct 2025 05:25:05 +0000 (13:25 +0800)]
drop initial keys when the handshake is confirmed (#5354)

3 months agouse synctest to make the connection tests fully deterministic (#5317)
Marten Seemann [Wed, 24 Sep 2025 10:54:22 +0000 (18:54 +0800)]
use synctest to make the connection tests fully deterministic (#5317)

3 months agoimprove connection timer logic (#5339)
Marten Seemann [Wed, 24 Sep 2025 08:43:01 +0000 (16:43 +0800)]
improve connection timer logic (#5339)

* simplify timer resets

As of Go 1.23, timer resets work as expected, and there’s no need to
read a (potentially) stale value from the timer channel.

* don't save the last time

* track if blocked

* remove unblock after sendingScheduled

* fix unblock logic when sending

* don't use fallthrough

* track the blocking mode

* remove stale comment

3 months agoadd a benchmark test for data transfers (#5335)
Marten Seemann [Sat, 20 Sep 2025 10:23:50 +0000 (18:23 +0800)]
add a benchmark test for data transfers (#5335)

3 months agoimplement a memory-optimized time.Time replacement (#5334)
Marten Seemann [Sun, 14 Sep 2025 06:12:10 +0000 (14:12 +0800)]
implement a memory-optimized time.Time replacement (#5334)

* implement a memory-optimized time.Time replacement

* monotime: properly handle systems with bad timer resolution (Windows)

* monotime: simplify Since

3 months agoackhandler: add a benchmark for sending and acknowledging packets (#5333)
Marten Seemann [Sun, 14 Sep 2025 05:00:13 +0000 (13:00 +0800)]
ackhandler: add a benchmark for sending and acknowledging packets (#5333)

* ackhandler: add a benchmark for sending and acknowledging packets

* report allocs, improve benchmark names

3 months agoreturn stream frames to pool on stream cancellations (#5327)
Marcin Rataj [Tue, 9 Sep 2025 11:15:45 +0000 (13:15 +0200)]
return stream frames to pool on stream cancellations (#5327)

* fix: return stream frames to pool on error paths

fixes potential memory leak where StreamFrames were not returned to
sync.Pool in error/cancellation paths.

root cause: frames are llocated via GetStreamFrame() but never returned
via PutBack() when streams enter terminal states without going through
normal OnAcked() cleanup.

fixed paths:
- CancelWrite(): return frames when reliableOffset == 0
- handleStopSendingFrame(): return frames on STOP_SENDING
- closeForShutdown(): return frames on connection shutdown
- OnLost(): return frame when stream reset with no data sent

* fix: clear slice before nil assignment, remove excessive tests

- add clear() call to properly release GC references per https://github.com/quic-go/quic-go/pull/5327#discussion_r2328451862
- remove excessive pool return tests per https://github.com/quic-go/quic-go/pull/5327#discussion_r2328453227

3 months agoci: bump actions/setup-go from 5 to 6 (#5330)
dependabot[bot] [Mon, 8 Sep 2025 04:52:38 +0000 (06:52 +0200)]
ci: bump actions/setup-go from 5 to 6 (#5330)

Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5 to 6.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 months agohttp3: don't allow usage of closed Transport (#5324)
Glonee [Sun, 7 Sep 2025 10:52:25 +0000 (18:52 +0800)]
http3: don't allow usage of closed Transport (#5324)

* do not allow use a closed transport

* update tests

* add test

* Update http3/transport.go

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* unit tests

* update test

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
3 months agoqlog: merge event category and name (#5329)
Marten Seemann [Sun, 7 Sep 2025 09:40:45 +0000 (17:40 +0800)]
qlog: merge event category and name (#5329)

This follows a (not so recent) change to the qlog specification.

3 months agoqlog: add a benchmark for the ConnectionTracer (#5328)
Marten Seemann [Sun, 7 Sep 2025 09:16:26 +0000 (17:16 +0800)]
qlog: add a benchmark for the ConnectionTracer (#5328)

This test aims to benchmark a somewhat realistic scenario of a QUIC
connection that sends packets and receives acknowledgments.

3 months agohttp3: fix race in concurrent Transport.RoundTrip calls (#5323)
Glonee [Sun, 7 Sep 2025 03:25:00 +0000 (11:25 +0800)]
http3: fix race in concurrent Transport.RoundTrip calls (#5323)

* http3: fix data race in Transport

* reset init Once

3 months agoackhandler: store the last four skipped packets (#5322)
Marten Seemann [Sat, 30 Aug 2025 06:05:59 +0000 (14:05 +0800)]
ackhandler: store the last four skipped packets (#5322)

This allows for more accurate packet number difference calculations,
which is especially important once we attempt to detect spurious loss
detection events.

3 months agoackhandler: account for skipped packets in packet threshold calculation (#5316)
Marten Seemann [Fri, 29 Aug 2025 03:39:41 +0000 (11:39 +0800)]
ackhandler: account for skipped packets in packet threshold calculation (#5316)

3 months agoackhandler: store skipped packet numbers separately (#5314)
Marten Seemann [Fri, 29 Aug 2025 03:09:46 +0000 (11:09 +0800)]
ackhandler: store skipped packet numbers separately (#5314)

3 months agoackhandler: avoid storing packet number in packet struct (#5312)
Marten Seemann [Fri, 29 Aug 2025 02:18:45 +0000 (10:18 +0800)]
ackhandler: avoid storing packet number in packet struct (#5312)

* ackhandler: optimize memory layout of packet struct

The packet number can be derived from the position that this packet is
stored at in the packets slice in the sent packet history. There is no
need to store the packet number, saving 8 bytes per packet.

* ackhandler: avoid copying the packet struct

3 months agoci: fix cache paths in cross compile workflow (#5318)
Marten Seemann [Fri, 29 Aug 2025 02:05:44 +0000 (10:05 +0800)]
ci: fix cache paths in cross compile workflow (#5318)

3 months agoci: improve cache key generation for the cross compilation job (#5315)
Marten Seemann [Thu, 28 Aug 2025 15:12:06 +0000 (23:12 +0800)]
ci: improve cache key generation for the cross compilation job (#5315)

3 months agoackhandler: immediately clear ackedPacket slice after processing ACK (#5313)
Marten Seemann [Thu, 28 Aug 2025 14:12:20 +0000 (22:12 +0800)]
ackhandler: immediately clear ackedPacket slice after processing ACK (#5313)

* ackhandler: immediately clear ackedPacket slice after processing ACK

* ackhandler: add defensive check for empty ackedPackets slice

3 months agoackhandler: use a typed mock for the ECNHandler (#5311)
Marten Seemann [Thu, 28 Aug 2025 11:39:42 +0000 (19:39 +0800)]
ackhandler: use a typed mock for the ECNHandler (#5311)

No functional change expected.

3 months agoackhandler: use an iterator to process received packet ranges (#5309)
Marten Seemann [Thu, 28 Aug 2025 08:32:26 +0000 (16:32 +0800)]
ackhandler: use an iterator to process received packet ranges (#5309)

* ackhandler: use an interator to track received packet ranges

* use slices.Collect

* naming convention

3 months agoackhandler: fix resetting of packet.isPathProbePacket (#5310)
Marten Seemann [Thu, 28 Aug 2025 08:18:49 +0000 (16:18 +0800)]
ackhandler: fix resetting of packet.isPathProbePacket (#5310)

4 months agoutils: use synctest to make the timer tests fully deterministic (#5306)
Marten Seemann [Mon, 25 Aug 2025 07:25:50 +0000 (15:25 +0800)]
utils: use synctest to make the timer tests fully deterministic (#5306)

* utils: use synctest to make the timer tests fully deterministic

* Go 1.24 workaround

4 months agouse synctest to make the datagram queue tests fully deterministic (#5305)
Marten Seemann [Mon, 25 Aug 2025 04:38:40 +0000 (12:38 +0800)]
use synctest to make the datagram queue tests fully deterministic (#5305)

4 months agouse synctest to make the outgoing path manager tests fully deterministic (#5304)
Marten Seemann [Sun, 24 Aug 2025 11:11:10 +0000 (19:11 +0800)]
use synctest to make the outgoing path manager tests fully deterministic (#5304)

4 months agoci: use go mod tidy -diff to check for tidied go.mod (#5303)
Marten Seemann [Sun, 24 Aug 2025 10:27:56 +0000 (18:27 +0800)]
ci: use go mod tidy -diff to check for tidied go.mod (#5303)

4 months agouse synctest to make the send stream tests fully deterministic (#5298)
Marten Seemann [Sun, 24 Aug 2025 05:09:16 +0000 (13:09 +0800)]
use synctest to make the send stream tests fully deterministic (#5298)

4 months agouse synctest to make the send queue tests fully deterministic (#5302)
Marten Seemann [Sun, 24 Aug 2025 04:58:41 +0000 (12:58 +0800)]
use synctest to make the send queue tests fully deterministic (#5302)

4 months agouse synctest.Wait in receive stream tests (#5299)
Marten Seemann [Sun, 24 Aug 2025 04:25:04 +0000 (12:25 +0800)]
use synctest.Wait in receive stream tests (#5299)

4 months agorestore previously deleted TestStreamsMapConcurrent test (#5301)
Marten Seemann [Sun, 24 Aug 2025 04:18:22 +0000 (12:18 +0800)]
restore previously deleted TestStreamsMapConcurrent test (#5301)

4 months agoci: fix cache save and restore logic for cross compile workflow (#5300)
Marten Seemann [Sun, 24 Aug 2025 03:48:49 +0000 (11:48 +0800)]
ci: fix cache save and restore logic for cross compile workflow (#5300)

lookup-only doesn't download the cache, even if it's there. This is not what we
intended: we still want to use the cache for PRs, we just want to upload a
new cache.

4 months agoci: cache the Go build cache for cross-compilation workflow (#5297)
Marten Seemann [Sat, 23 Aug 2025 16:27:48 +0000 (00:27 +0800)]
ci: cache the Go build cache for cross-compilation workflow (#5297)

* ci: cache the Go build cache for cross-compilation workflow

* only store cache when on master

* don't hash go.sum in

4 months agouse synctest to make streams map tests fully deterministic (#5296)
Marten Seemann [Sat, 23 Aug 2025 16:11:59 +0000 (00:11 +0800)]
use synctest to make streams map tests fully deterministic (#5296)

* use synctest to make streams map tests fully deterministic

* ignore synctest helper package for code coverage

4 months agouse synctest to make receive stream tests fully deterministc (#5291)
Marten Seemann [Wed, 20 Aug 2025 07:44:19 +0000 (15:44 +0800)]
use synctest to make receive stream tests fully deterministc (#5291)

4 months agoci: bump actions/checkout from 4 to 5 (#5293)
dependabot[bot] [Mon, 18 Aug 2025 02:53:15 +0000 (04:53 +0200)]
ci: bump actions/checkout from 4 to 5 (#5293)

Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 months agouse testing.B.Loop in all benchmark tests (#5285)
Marten Seemann [Sat, 16 Aug 2025 10:44:56 +0000 (12:44 +0200)]
use testing.B.Loop in all benchmark tests (#5285)

go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -category=bloop -fix -test ./...
was used as a starting point.

4 months agoreplace interface{} with any (#5290)
Marten Seemann [Sat, 16 Aug 2025 05:21:18 +0000 (07:21 +0200)]
replace interface{} with any (#5290)

No functional change expected.

4 months agoupdate to Go 1.25, drop Go 1.23, use go tool for gomock (#5283)
Marten Seemann [Sat, 16 Aug 2025 04:14:01 +0000 (06:14 +0200)]
update to Go 1.25, drop Go 1.23, use go tool for gomock (#5283)

* update to Go 1.25, drop support for Go 1.23

* ci: update golangci-lint to v2.4.0

* use new go tool command for gomock / mockgen

* also update Go version used for oss-fuzz

4 months agoackhandler: generalize check for missing packets below threshold (#5260)
Marten Seemann [Thu, 14 Aug 2025 14:51:24 +0000 (16:51 +0200)]
ackhandler: generalize check for missing packets below threshold (#5260)

* ackhandler: check for missing packets below reordering treshold

No functional change expected.

With the Acknowledgement Frequency extension, the reordering threshold
will become configurable. With this change, it will be easy to use the
peer-requested value instead of the predefined constant.

* improve documentation

* call HighestMissingUpTo in randomized test

4 months agoexpose basic connection stats via Conn.ConnectionStats (#5281)
Marten Seemann [Wed, 13 Aug 2025 14:45:14 +0000 (16:45 +0200)]
expose basic connection stats via Conn.ConnectionStats (#5281)

* Add ConnectionStats

* remove for loop

* Add comments

* Update comments

---------

Co-authored-by: Marco Munizaga <git@marcopolo.io>
4 months agofix documentation for EarlyListener.Close (#5284)
WeidiDeng [Wed, 13 Aug 2025 14:24:07 +0000 (22:24 +0800)]
fix documentation for EarlyListener.Close (#5284)

* quic: update documentaion for EarlyListener.Close

* fix missing space

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
4 months agohttp3: fix documentation for Server.ServeListener (#5282)
WeidiDeng [Tue, 12 Aug 2025 14:14:09 +0000 (22:14 +0800)]
http3: fix documentation for Server.ServeListener (#5282)

4 months agofix repeated initialization of outgoingPathManager in Conn.AddPath (#5280)
Marten Seemann [Tue, 12 Aug 2025 13:59:39 +0000 (15:59 +0200)]
fix repeated initialization of outgoingPathManager in Conn.AddPath (#5280)

In case of concurrent calls, this may still be called multiple times.

Co-authored-by: Marco Munizaga <git@marcopolo.io>
4 months agoquicvarint: tolerate empty reads of the underlying io.Reader (#5275)
Benjamin M. Schwartz [Tue, 5 Aug 2025 06:05:52 +0000 (02:05 -0400)]
quicvarint: tolerate empty reads of the underlying io.Reader (#5275)

* Tolerate empty reads in `quicvarint.Read`

Currently, `quicvarint.Read` misinterprets an empty read (`n==0`)
as a single zero byte.  While empty reads are "discouraged" in
the `io.Reader` interface, they do sometimes happen, especially
when using `io.Pipe()`.

This change tolerates empty reads, adds a corresponding unit test,
and also includes some additional test coverage related to empty
capsules

* minor test refactor

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
4 months agoquicvarint: extend benchmark to use quicvarint.Reader (#5278)
Marten Seemann [Tue, 5 Aug 2025 05:49:55 +0000 (07:49 +0200)]
quicvarint: extend benchmark to use quicvarint.Reader (#5278)

* quicvarint: extend benchmark to use quicvarint.Reader

* rename variable

4 months agoackhandler: remove unused time from receivedPacketHandler.ReceivedPacket (#5277)
Marten Seemann [Tue, 5 Aug 2025 04:03:02 +0000 (06:03 +0200)]
ackhandler: remove unused time from receivedPacketHandler.ReceivedPacket (#5277)

* ackhandler: remove unused time from receivedPacketHandler.ReceivedPacket

No functional change expected.

* fix typo

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* also fix typo in tests

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
4 months agoqlog: add support for ACK_FREQUENCY and IMMEDIATE_ACK frames (#5276)
Marten Seemann [Mon, 4 Aug 2025 08:00:02 +0000 (10:00 +0200)]
qlog: add support for ACK_FREQUENCY and IMMEDIATE_ACK frames (#5276)

4 months agofix missing log statement for STREAM, DATAGRAM and ACK (#5273)
Jannis Seemann [Thu, 31 Jul 2025 23:37:13 +0000 (02:37 +0300)]
fix missing log statement for STREAM, DATAGRAM and ACK (#5273)

5 months agowire: add support for the min_ack_delay transport parameter (#5266)
Marten Seemann [Thu, 24 Jul 2025 13:43:34 +0000 (15:43 +0200)]
wire: add support for the min_ack_delay transport parameter (#5266)

* wire: implement parsing and writing of the min_ack_delay transport parameter

* wire: validate the min_ack_delay transport parameter

5 months agofuzzing: fix timeout in frame parser (#5268)
Jannis Seemann [Tue, 22 Jul 2025 15:45:00 +0000 (18:45 +0300)]
fuzzing: fix timeout in frame parser (#5268)

5 months agowire: implement parsing and writing of the IMMEDIATE_ACK frame (#5265)
Marten Seemann [Mon, 21 Jul 2025 13:56:04 +0000 (09:56 -0400)]
wire: implement parsing and writing of the IMMEDIATE_ACK frame (#5265)

5 months agowire: implement parsing and writing of the ACK_FREQUENCY frame (#5264)
Marten Seemann [Mon, 21 Jul 2025 13:35:06 +0000 (09:35 -0400)]
wire: implement parsing and writing of the ACK_FREQUENCY frame (#5264)

* implement parsing and writing of the ACK_FREQUENCY frame

* prevent overflows of Request Max Ack Delay

* fix fuzzer

5 months agowire: optimize parsing logic for STREAM, DATAGRAM and ACK frames (#5227)
Jannis Seemann [Sun, 20 Jul 2025 11:14:38 +0000 (14:14 +0300)]
wire: optimize parsing logic for STREAM, DATAGRAM and ACK frames (#5227)

ParseOtherFrames-16       148ns ± 4%     150ns ± 3%     ~     (p=0.223 n=8+8)
ParseAckFrame-16          302ns ± 2%     298ns ± 3%     ~     (p=0.246 n=8+8)
ParseStreamFrame-16       262ns ± 3%     213ns ± 2%  -18.61%  (p=0.000 n=8+8)
ParseDatagramFrame-16     561ns ± 5%     547ns ± 4%     ~     (p=0.105 n=8+8)

5 months agowire: improve frame parsing benchmarks (#5263)
Jannis Seemann [Fri, 18 Jul 2025 16:33:04 +0000 (19:33 +0300)]
wire: improve frame parsing benchmarks (#5263)

* Add master-style frame handling benchmarks using type switches

* Fixing styling issue.

* put STREAM frame back

* remove BenchmarkParseStreamAndACK

* use random data for STREAM and DATAGRAM

* improve comment

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
5 months agoclose Transport when DialAddr fails (#5259)
Coia Prant [Sat, 12 Jul 2025 16:58:30 +0000 (00:58 +0800)]
close Transport when DialAddr fails (#5259)

Close the transport after dial fails to avoid memory leaks. Same logic as DialAddrEarly.

Signed-off-by: Coia Prant <coiaprant@gmail.com>
5 months agohttp3: remove dependency on quic internal packages (#5256)
Robin Thellend [Mon, 7 Jul 2025 11:41:23 +0000 (04:41 -0700)]
http3: remove dependency on quic internal packages (#5256)

* Remove http3 dependency on quic internal packages

Remove the dependency on internal/protocol from the http3 package. This
makes it possible for a forked http3 to use the mainline quic-go
package.

* Address review comments

* Fix syntax

* Use broader pattern for http3 directory

* Copy internal/testdata

* Replace perspective with bool

* clone the supported version slice

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
5 months agofix flaky TestPostQuantumClientHello (#5253)
Marten Seemann [Sun, 29 Jun 2025 05:09:45 +0000 (13:09 +0800)]
fix flaky TestPostQuantumClientHello (#5253)

5 months agoadd a Config and ConnectionState flag for RESET_STREAM_AT (#5243)
Marten Seemann [Sun, 29 Jun 2025 03:42:02 +0000 (11:42 +0800)]
add a Config and ConnectionState flag for RESET_STREAM_AT (#5243)

* add a Config and ConnectionState flag for RESET_STREAM_AT

* add RESET_STREAM_AT to README

5 months agohttp3: fix flaky TestConnGoAwayFailures (#5252)
Marten Seemann [Sat, 28 Jun 2025 18:28:07 +0000 (02:28 +0800)]
http3: fix flaky TestConnGoAwayFailures (#5252)

5 months agofix flaky TestServerReceiveQueue (#5249)
Marten Seemann [Sat, 28 Jun 2025 13:19:28 +0000 (21:19 +0800)]
fix flaky TestServerReceiveQueue (#5249)

6 months agofix flaky TestDrainServerAcceptQueue (#5247)
Marten Seemann [Sat, 28 Jun 2025 07:37:18 +0000 (15:37 +0800)]
fix flaky TestDrainServerAcceptQueue (#5247)

The connections are not necessarily accepted in the same order that
they are dialed.

6 months agofix flaky TestTransportReplaceWithClosed (#5245)
Marten Seemann [Sat, 28 Jun 2025 07:09:36 +0000 (15:09 +0800)]
fix flaky TestTransportReplaceWithClosed (#5245)

6 months agoimplement sender side behavior for RESET_STREAM_AT (#5242)
Marten Seemann [Sat, 28 Jun 2025 03:44:47 +0000 (11:44 +0800)]
implement sender side behavior for RESET_STREAM_AT (#5242)

* improve existing send stream test

* implement sender side behavior for RESET_STREAM_AT

* refactor send stream cancelation and shutdown error handling

* correctly deal with 0-RTT corner case

6 months agoimplement receiver side behavior for RESET_STREAM_AT (#5235)
Marten Seemann [Thu, 26 Jun 2025 06:42:08 +0000 (14:42 +0800)]
implement receiver side behavior for RESET_STREAM_AT (#5235)

* implement receiver side behavior for RESET_STREAM_AT

* simplify reliable offset tracking

6 months agofix retransmission logic for path probing packets (#5241)
Marten Seemann [Thu, 26 Jun 2025 05:49:44 +0000 (13:49 +0800)]
fix retransmission logic for path probing packets (#5241)

To achieve an exponential backoff, the timer should only be reset after
having fired.

6 months agoquicvarint: speed up parsing of 1, 2 and 4 byte varints (#5229)
Jannis Seemann [Tue, 24 Jun 2025 13:42:13 +0000 (16:42 +0300)]
quicvarint: speed up parsing of 1, 2 and 4 byte varints  (#5229)

6 months agodrain server accept queue when the transport is closed (#5237)
Marten Seemann [Tue, 24 Jun 2025 13:20:23 +0000 (21:20 +0800)]
drain server accept queue when the transport is closed (#5237)

* drain server queue on transport close

* add integration test for clearing conn queue

* improve documentation and test for Transport.Close

* move to handshake_test.go

---------

Co-authored-by: sukun <sukunrt@gmail.com>
6 months agofix deadlock when closing the Transport (#5220)
sukun [Tue, 24 Jun 2025 11:55:42 +0000 (17:25 +0530)]
fix deadlock when closing the Transport (#5220)

* transport: fix deadlock on close

The lock ordering is Transport.mutex before connMx. This deadlocks
some times in tests.
For the latest one:
https://github.com/libp2p/go-libp2p/actions/runs/15534001571/job/43728863965?pr=3305

* remove connMx

* release mutex for server close

* Update server.go

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
6 months agohandshake: store key update interval in an atomic (#5234)
Marten Seemann [Sat, 21 Jun 2025 10:14:07 +0000 (18:14 +0800)]
handshake: store key update interval in an atomic (#5234)

* handshake: store key update interval in an atomic

We recently changed the way the key update interval is set in tests to
use an environment variable. This resolved a race condition that existed
in the earlier logic, however, parsing of the environment variable now
shows up in benchmark tests.

Using an atomic variable should have a negligible performance impact.

* use an atomic swap

6 months agoimprove documentation for the various error types (#5233)
Marten Seemann [Sat, 21 Jun 2025 07:23:29 +0000 (15:23 +0800)]
improve documentation for the various error types (#5233)

6 months agohttp3: tighten checks for incorrect use of RequestStream (#5231)
Marten Seemann [Fri, 20 Jun 2025 07:55:11 +0000 (15:55 +0800)]
http3: tighten checks for incorrect use of RequestStream (#5231)

The RequestStream is a low-level API that’s used by WebTransport,
CONNECT-UDP and CONNECT-IP. Methods on the RequestStream must be called
in a certain order, and we should detect misuse of the API.

6 months agohttp3: avoid reinitilising the frame parser on the stream (#5232)
Marten Seemann [Fri, 20 Jun 2025 05:34:03 +0000 (13:34 +0800)]
http3: avoid reinitilising the frame parser on the stream (#5232)

No functional change expected.

6 months agohttp3: remove deprecated RoundTripper (#5230)
Marten Seemann [Fri, 20 Jun 2025 03:44:53 +0000 (11:44 +0800)]
http3: remove deprecated RoundTripper (#5230)

6 months agohttp3: explicitly expose all method on the RequestStream (#5216)
Marten Seemann [Thu, 19 Jun 2025 10:16:26 +0000 (18:16 +0800)]
http3: explicitly expose all method on the RequestStream (#5216)

6 months agohttp3: add ClientConn.Context, CloseWithError and Conn (#5219)
Marten Seemann [Tue, 17 Jun 2025 16:29:27 +0000 (00:29 +0800)]
http3: add ClientConn.Context, CloseWithError and Conn (#5219)

6 months agoci: add Go 1.25rc1 to tested Go versions (#5224)
Marten Seemann [Tue, 17 Jun 2025 03:13:09 +0000 (11:13 +0800)]
ci: add Go 1.25rc1 to tested Go versions (#5224)

* ci: add Go 1.25rc1 to tested Go versions

* fix rc name

6 months agoci: enable the usetesting linter (#5222)
Marten Seemann [Wed, 11 Jun 2025 07:39:07 +0000 (15:39 +0800)]
ci: enable the usetesting linter (#5222)

This linter is useful to detect the creation of temporary directories
and the setting of environment variables in tests.

6 months agoci: enable the nolintlint linter (#5221)
Marten Seemann [Wed, 11 Jun 2025 04:52:21 +0000 (12:52 +0800)]
ci: enable the nolintlint linter (#5221)

This linter helps us find unneeded nolint statements.

6 months agorename Conn receiver variable (#5215)
Marten Seemann [Mon, 9 Jun 2025 11:48:36 +0000 (19:48 +0800)]
rename Conn receiver variable (#5215)

No functional change expected.

6 months agohttp3: remove deprecated SingleDestinationRoundTripper type (#5217)
Marten Seemann [Mon, 9 Jun 2025 11:46:53 +0000 (19:46 +0800)]
http3: remove deprecated SingleDestinationRoundTripper type (#5217)

6 months agohttp3: convert Connection interface to Conn struct (#5204)
Marten Seemann [Mon, 9 Jun 2025 10:16:07 +0000 (18:16 +0800)]
http3: convert Connection interface to Conn struct (#5204)

6 months agoconvert Connection interface to Conn struct (#5195)
Marten Seemann [Mon, 9 Jun 2025 09:51:46 +0000 (17:51 +0800)]
convert Connection interface to Conn struct (#5195)

6 months agoexplictly expose all method on the Stream (#5214)
Marten Seemann [Mon, 9 Jun 2025 09:14:58 +0000 (17:14 +0800)]
explictly expose all method on the Stream (#5214)

This hides the fact that a Stream is composed of a ReceiveStream and a
SendStream. This is an implementation detail and should not be exposed.

6 months agohandle stream-related frame in the streams map (#5212)
Marten Seemann [Mon, 9 Jun 2025 08:00:46 +0000 (16:00 +0800)]
handle stream-related frame in the streams map (#5212)

* handle stream-related frame in the streams map

* remove stream manager interface and mock

6 months agoremove connection flow controller mock (#5213)
Marten Seemann [Mon, 9 Jun 2025 07:26:23 +0000 (15:26 +0800)]
remove connection flow controller mock (#5213)

No functional change expected.

6 months agoci: enable Codecov test analysis (#5210)
Marten Seemann [Mon, 9 Jun 2025 07:09:30 +0000 (15:09 +0800)]
ci: enable Codecov test analysis (#5210)

* ci: enable Codecov test analysis

* ci: set package name for pre-built test binary

6 months agosimplify stream ID handling in the outgoing streams map (#5209)
Marten Seemann [Sun, 8 Jun 2025 12:27:14 +0000 (20:27 +0800)]
simplify stream ID handling in the outgoing streams map (#5209)

No functional change expected.