perf: known_routes retention, digest identity, and a working batched reconfirm (#98)

* fix: cascade channel_messages on packet delete

* rebuild known_routes keyed on (iata, path_key)

* add route retention delete, batch reconfirm, path_key upsert

* compute route path_key in store, add DeleteOldRoutes

* add routes retention config

* wire route retention into cleanup, batch reconfirm

* prune routes in reconfirm task, not cleanup

* expand routes retention docs in example config
This commit is contained in:
MrAlders0n authored and GitHub committed 2026-08-12 09:30:03 -04:00
1 parent c6d23a2b52
commit 7d759d0a0f
13 files changed
+473 -118

No files matched your search

+19
View File
@@ -75,6 +75,25 @@ telemetry:
packets:
retention: 720h # 30 days
# Known-route retention. Routes are distilled packet history (the path a packet
# took, hop by hop), so they may outlive packets.retention; there is no required
# relationship between the two.
routes:
# How long a route is kept after it was last observed. Every new observation
# of the same path resets this clock, so routes the mesh still uses never
# expire -- only paths nothing has traveled for this long age out.
retention: 336h # 14 days
# Shorter window for rarely-seen routes: one observed fewer than
# min_observations times in total is dropped once it goes unobserved for
# this long. Must be shorter than retention, or it never applies.
grace: 168h # 7 days
# Lifetime observation count a route must reach to earn the full retention
# window. Below it a route is treated as flood noise -- a path recorded once
# or twice and never confirmed -- and only kept for the grace window. The
# count never resets, so once a route crosses this bar it stays in the
# retention tier for good.
min_observations: 3
websocket:
max_connections_per_ip: 5 # default: 5