Skip to content

feat(routing-policy): add experimental 'coupled' preset (MPTCP-style coupled congestion control) - #4113

Merged
0pcom merged 1 commit into
skycoin:developfrom
0pcom:feat/policy-preset-coupled
Aug 23, 2026
Merged

feat(routing-policy): add experimental 'coupled' preset (MPTCP-style coupled congestion control)#4113
0pcom merged 1 commit into
skycoin:developfrom
0pcom:feat/policy-preset-coupled

Conversation

@0pcom

@0pcom 0pcom commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Adds a new experimental routing-policy preset, coupled, inspired by MPTCP's
coupled congestion control (LIA/OLIA). It is opt-in and changes no existing
default (adaptive and the shipped default are untouched).

decide returns a modest symmetric mux (4) over the multi-hop overlay and asks
the host to weight bytes toward the best legs (Distribution: "auto"), rather
than round-robin's equal spread across a congested leg. The on_tick controller
then couples the aggregate using two per-leg signals — the retransmit delta since
last tick (loss, packet-normalized by the sent-bytes delta) and EWMA latency:

  • Coupled increase (LIA-cautious): promote at most one warm spare per tick, and
    only when NO active leg shows rising loss.
  • Coupled decrease: the instant any active leg's loss rises, shed the worst leg
    (highest loss, latency-tiebroken; never leg 0, never below a floor of 2), so
    aggregate aggressiveness stays bounded and traffic concentrates on the good
    legs.

The logic lives in the single source of truth (pkg/router/policy/preset) and is
deterministic (no time.Now/rand), so the native path and the recompiled
bundle.wasm run byte-identically. The bundle was rebuilt with TinyGo.

Testing: go test ./pkg/router/policy/... passes, including the native<->wazero
parity suite (decide + a multi-tick shed/promote sequence added for coupled).
New native unit tests cover loss->shed-worst, clean->cautious-promote, and the
coupling property that rising loss forbids growth even when a spare is available.

…coupled congestion control)

A new opt-in preset inspired by MPTCP's coupled congestion control (LIA/OLIA).
It provisions a modest symmetric mux (4) over the multi-hop overlay and weights
bytes toward the best legs (Distribution "auto"), then couples the aggregate in
on_tick using per-leg retransmit-delta (loss) and EWMA latency:

  - coupled INCREASE (LIA-cautious): promote at most one warm spare per tick,
    and only when NO active leg shows rising loss.
  - coupled DECREASE: the instant any active leg's loss rises, shed the worst
    leg (highest loss, latency-tiebroken; never leg 0, never below a floor of 2)
    so aggregate aggressiveness stays bounded and traffic concentrates on the
    good legs rather than equal-spreading across a lossy one.

Deterministic (no time.Now/rand) so the native and wazero paths stay
byte-identical. Registered in preset dispatch, names, and the bundle manifest;
bundle.wasm rebuilt. No existing default changes - decideAdaptive untouched.

Adds native unit tests (loss->shed-worst, clean->cautious-promote,
coupling-forbids-grow-under-loss) and coupled decide+tick cases to the
native<->wazero parity suite.
@0pcom
0pcom force-pushed the feat/policy-preset-coupled branch from 7f71242 to 39191ab Compare August 23, 2026 02:05
@0pcom
0pcom merged commit 9a177be into skycoin:develop Aug 23, 2026
12 of 16 checks passed
@0pcom
0pcom deleted the feat/policy-preset-coupled branch August 23, 2026 02:08
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