0.2.0

Loss recovery, congestion control, ACK generation, stream reassembly, and production hardening

Highlights

  • Loss recovery — Full RFC 9002 loss detection and congestion control via the newzoomies.recoverymodule
  • ACK generation — Per-space packet number tracking with ACK frame emission
  • Stream reassembly — Ordered delivery through wiredStreamclass
  • Congestion control — NewReno (RFC 9002 §7) with cwnd gating in the send path
  • Production hardening — Flow control, idle timeout, anti-amplification, CONNECTION_CLOSE, key rotation

Added

Recovery module (zoomies.recovery)

  • SentPacket registry and PacketSpaceper-space tracking
  • RttEstimatorwith EWMA smoothing (RFC 9002 §5.3)
  • Packet-number and time-based loss detection with frame retransmission
  • PTO probing with exponential backoff
  • Anti-amplification enforcement (3x limit before address validation)
  • NewReno congestion controller with cwnd gating

Protocol features

  • ACK generation — track received packet numbers per space, emit ACK frames
  • Stream reassembly —Streamwired into connection for ordered delivery
  • Stream send offset tracking viaStreamSendState.advance()
  • HANDSHAKE_DONE frame sent after handshake completes
  • CONNECTION_CLOSE frame support
  • STOP_SENDING / RESET_STREAM frame handling
  • Key update rotation via HKDF "quic ku"
  • Variable packet-number length encoding
  • Flow control enforcement and idle timeout
  • Sans-I/O timer pattern for loss detection callbacks

Performance

  • AES-ECB cipher cached onCryptoContext, optimized nonce XOR
  • QPACK static table dict for O(1) lookup, bytes-native encode path
  • Packet coalescing in_flush_stream_send_queue
  • bisect.insortfor stream chunks and crypto ranges
  • Prune consumed crypto ranges, bytes-join instead of+=
  • Consolidated HKDF into sharedcrypto/_hkdf.pymodule

Testing

  • Benchmarks for handshake latency and stream throughput
  • Recovery integration tests (packet drops, PTO escalation)
  • Interop tests (encrypt/decrypt roundtrip)
  • Hypothesis property tests for recovery invariants
  • Connection hygiene and hardening test suites

Fixed

  • InvalidTagstate corruption bug in crypto processing

Status

  • Alpha: full TLS 1.3 handshake, 1-RTT, loss recovery, congestion control
  • Sans-I/O design, typed, free-threading ready