throughput 4a: swap RaptorQ → hand-rolled small-K Reed–Solomon FEC #50
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
femboy/yip!50
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/throughput-4a"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Replaces yip's RaptorQ FEC with a hand-rolled small-K systematic Reed–Solomon codec, unlocking multi-gigabit single-core throughput while keeping proactive, zero-RTT loss recovery. This is Stage 1 of a staged FEC-codec campaign (RS → sliding-window RLC → RLNC recoding); it builds the reusable GF(256) core the later stages ride on.
Why
A profiling spike + four-track investigation established:
SourceBlockEncodingPlanonly reaches ~12 µs — 96% of the residual is the irreducible GF(256) solve over RaptorQ's K′=10 minimum block (a 2-symbol packet does ~10 symbols of work).observe_lossclampsratio ≤ 1.0, sorepair_count ≤ source). We paid RaptorQ's biggest cost for a capability we don't use.unsafe.How
Three layers, all
#![forbid(unsafe_code)]:crates/yip-transport/src/gf256.rs— GF(256) field (poly 0x11D, primitive 2), table-basedadd/mul/inv/mul_slice_into.crates/yip-transport/src/rs.rs— normative RS-v1 Cauchy generator (C[m][i] = inv((K+m) ⊕ i)), systematic encode + erasure decode (GF(256) Gauss–Jordan), gated by an exhaustive K-of-(K+R) MDS proof (K∈1..8 × R∈1..4, every erasure pattern) + areed-solomon-erasureoracle cross-check (dev-dep).crates/yip-transport/src/fec.rs— rewrittenFecEncoder/FecReassembler: codec-taggedpayload_id = [0x01, idx_hi, idx_lo, 0], systematic no-loss passthrough,repair_with_idfull re-encode for ARQ, all DoS guards preserved + new ones.raptorqdependency dropped fromyip-transportandyip-bench.bin/yipd/src/wire_glue.rsandcrates/yip-wire::Frameare unchanged — the wire codec change is entirely inpayload_idsemantics (a codec tag that pre-slots RLC as0x02, and fails safe against RaptorQ peers).Results
yip-transport57/57,yipd134/134, workspace clippy clean.Final whole-branch review (opus): READY TO MERGE, no Critical/Important — MDS-proven correctness, guarded DoS/ARQ/wire seams, constraints intact.
Wire compatibility
Wire-incompatible with RaptorQ peers (fails safe via the codec tag). Acceptable under the pre-release "both peers rebuild together" posture.
Deferred follow-ups (non-blocking)
CLAUDE.md,README,docs/research, and a now-misleadingyip-wire/src/lib.rs:17comment still say "RaptorQ".u8::try_fromcleanup of oneascast in agf256test.yip-rendezvous-binsmoke testregister_lookup_relay_over_udp_with_obf_pskis a pre-existing UDP-timeout flake (passes on re-run; no dependency on this change) — worth hardening its 2s recv timeout separately.Design docs
docs/superpowers/specs/2026-07-09-throughput-rs-codec-4a-design.mddocs/superpowers/plans/2026-07-09-throughput-rs-codec-4a.md🤖 Generated with Claude Code
https://claude.ai/code/session_01RVP6NnbDMAg1iTsMMTfL86