Skip to content

feat(net)!: add cold route rank for pop skipping - #2894

Draft
kixelated wants to merge 1 commit into
devfrom
codex/pop-skipping-rank
Draft

feat(net)!: add cold route rank for pop skipping#2894
kixelated wants to merge 1 commit into
devfrom
codex/pop-skipping-rank

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Summary

  • add a Lite06 Cold Route Cost beside marginal Route Cost so a carrying relay keeps a stable per-broadcast rank
  • adopt a warm peer only when its (cold cost, relay hash) rank is strictly lower, and compare warm rank before hop count when marginal costs tie
  • advertise each relay's own cold rank rather than inheriting its active parent, preserving strict descent across transitive warm trees
  • keep IETF and older Lite routes on the existing hash-only compatibility path because those wire formats do not carry cold cost
  • mirror the wire field in js/net and specify it in the moq-lite draft

This replaces the viable remaining rank slice from #2179. The old base/transit-cost prototype was superseded by cumulative Route Cost in #2424 and is now far behind dev. The current design comes from the pop-skipping quest.

Marginal warm discounts intentionally collapse to zero, but that erases the upstream path cost needed to select an aggregation root in asymmetric and simultaneous activation topologies. Cold Route Cost preserves that undiscounted path signal without changing marginal cost as the primary routing metric.

Public API changes

  • Breaking Rust: lite::AnnounceBroadcast::Active and Restart add the required cold: RouteCost field. This is why the PR targets dev.
  • Additive TypeScript: active and restart AnnounceBroadcast variants add optional cold?: bigint.
  • The routing model's cold bookkeeping remains pub(crate); no second public broadcast::Route metric is exposed.

Test plan

  • nix develop --command just fix
  • nix develop --command just check
  • nix develop --command cargo test -p moq-net (864 unit tests plus integration and docs)
  • nix develop --command bun test js/net/src/lite/announce.test.ts
  • nix develop --command just test smoke-full (21 Rust/Python/JS/C/GStreamer combinations)

Cross-package sync: updated js/net and drafts/draft-lcurley-moq-lite.md. There is no existing doc/concept route-selection page to update. The IETF cluster wire is intentionally unchanged because the current quest rollout is Lite06-only.

(Written by GPT-5)

Co-Authored-By: GPT-5 <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant