Build on the GetStream pion forks and always offer WARP - #6
Merged
Merged
Conversation
Replace pion/webrtc, pion/ice, pion/dtls/v4 and pion/sctp with the GetStream forks that implement WARP (draft-uberti-tsvwg-warp), and move to dtls/v4. Every peer connection now offers DTLS 1.2 to 1.3 and DTLS in the ICE checks (SPED); the SFU decides in band. An SFU without WARP answers as before, so there is one code path and nothing for callers to configure. The ICE fork also nominates on the first successful check against the ICE-lite SFU instead of waiting for the next check tick. The local network delay layer (internal/netdelay) moves to pion/transport/v5 with pion/webrtc v4.2.22. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
tbarbugli
force-pushed
the
warp/sdk-clean
branch
from
September 30, 2026 20:20
bc684ae to
0e2e559
Compare
pion's ICETransport.GetSelectedCandidatePairStats reads the transport's gatherer without its lock, and ICETransport.Start sets it. With SPED, Start runs inside the DTLS start, concurrently with the join trace polling the RTT, and the race detector caught it in video-sfu's end-to-end suite. ICE connected is reported after Start, so reading from then on is ordered after the write. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
tbarbugli
added a commit
that referenced
this pull request
Sep 30, 2026
…E-lite SFU ICE on each peer connection connects one round trip after the first check instead of two. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
pion answers an ICE-lite offerer passive, which made the SFU the DTLS client on the subscriber peer connection. Its ClientHello could then only ride the responses to our checks, one datagram each. Answering active to a SPED offer puts our one-datagram ClientHello in our first check, as browsers do, so the subscriber is connected when ICE is. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
tbarbugli
marked this pull request as ready for review
September 30, 2026 21:37
tbarbugli
added a commit
that referenced
this pull request
Oct 1, 2026
Bring WARP (#6) into factory/3rtt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Offers WARP (draft-uberti-tsvwg-warp) on every peer connection: DTLS 1.2 to 1.3, and DTLS carried in the ICE connectivity checks (SPED). The SFU negotiates both in band. An SFU without WARP answers as before, and the connection falls back to DTLS 1.2 after ICE. There is no option: one code path, nothing for callers to configure.
Stacked on #3 (skip the DTLS HelloVerify), which targets
factory/3rtt. This PR's base is #3's branch, so the diff shows only the WARP work. Retarget tofactory/3rttonce #3 merges. It doesn't depend on #4.Commits:
replacedirectives to the forks;pion/dtls/v3→v4imports;SetDTLSVersionRange(1.2, 1.3)andEnableSped(true)inpc/pc.go;TestWARPNegotiation: a WARP SFU gets DTLS 1.3 and SPED, a legacy SFU gets DTLS 1.2 without SPED.v4.4.4-warp.3: nominate in the first check toward the ICE-lite SFU, so ICE takes one round trip instead of two.TestWARPSubscriberAnswersActivefails without the change.Forks (all public, remote tags):
Go doesn't apply
replacedirectives from a dependency'sgo.mod. Every consumer of this SDK (the Vision-Agents router, video-sfutest/e2e) must add the same four to its owngo.mod. Without them it builds against upstream pion and gets no WARP, or fails to build on thedtls/v4imports.Measured with
cmd/joinbench: warm pubsub join, from Join to first media, medians of 10 runs, publish / subscribe in ms. Before is the T02 baseline SDK against an SFU without WARP. After is this PR, integrated with the otherfactory/3rttwork as3rtt/t12-warp9dd287d, against a WARP SFU (video-sfu #1622):DTLS after ICE went from 2 RTT to 0 on both peer connections.
Tested: GitHub Actions is blocked by org billing, so CI doesn't run on this PR.
make ci(build, vet, gofumpt check,go test -race ./...) passes locally on the branch and on the3rtt/t12-warpintegration.