You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Activate only the feeds this host is subscribed to, and add/remove them at
runtime as subscriptions change — all feed detection in one place.
- ingest::subscriptions: the single detector, reading host subscriptions from
`doublezero status --json` (the `multicast_groups` S:<code> entries — the
authoritative per-host view), with shred-group IPs resolved via `multicast
group list`. feeds.rs gains a group `code` (tiredsolid/scottsdale).
- ingest::reconcile: a periodic reconciler (--subscription-refresh-secs, default
30) diffs desired-vs-running and spawns/aborts market-data receivers, the WS
sink, and the shred forwarder. The WS sink activates only when a market-data
feed is subscribed (so a shreds-only host serves no WS and can't collide with
an existing :8081 service); shred sources track the subscribed edge-solana-*
groups. Teardown is JoinHandle::abort(); a died feed self-heals next tick.
- Default-on with fail-open: no `doublezero` CLI -> static always-on set; a
transient CLI error -> keep current activations. --subscription-gating-disable
forces the static model (the e2e harness uses it — it feeds synthetic multicast).
- Supersedes the shred forwarder's one-shot discovery: remove discover_groups /
resolve_sources / decide_activation in favour of the reconciler.
Docs + CHANGELOG updated; cargo build/clippy/test all green.
|**WebSocket** (`sinks::ws`) |**on**|on unless `--ws-bind` is empty; `--ws-bind ""` disables it |`--ws-bind` (`WS_BIND`, default `0.0.0.0:8081`) + the `--ws-*` limits |
10
+
|**WebSocket** (`sinks::ws`) |**on when subscribed**|configured unless `--ws-bind` is empty (`--ws-bind ""` disables it); *activated* only when ≥1 market-data feed is subscribed|`--ws-bind` (`WS_BIND`, default `0.0.0.0:8081`) + the `--ws-*` limits |
11
11
|**Metrics** (`sinks::metrics`) |**off**| on when `--metrics-bind` is non-empty |`--metrics-bind` (`METRICS_BIND`, default empty) |
12
12
13
-
A sink is active when its key config value is non-empty/present; the WebSocket sink simply ships
14
-
a non-empty default bind, so it is on unless you explicitly clear it, while the metrics endpoint
15
-
ships an empty default, so it is off unless you give it a bind.
13
+
The metrics endpoint is active when its key config value is non-empty. The WebSocket sink ships a
14
+
non-empty default bind (so it's *configured* unless you clear it), but the **subscription
15
+
reconciler** only *activates* it once this host is actually subscribed to a market-data feed —
16
+
so a shreds-only host serves no WebSocket and can't collide with an existing `:8081` service, with
17
+
no manual config. Its listener is bound non-fatally: a taken port disables the sink for that cycle
18
+
(retried on the next reconcile) but never crash-loops the process or the DoubleZero tunnel. Running
19
+
from source without the `doublezero` CLI, gating falls open and the sink is active whenever
20
+
configured. See the main README for the reconciler flags (`--subscription-refresh-secs`,
0 commit comments