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
{{ message }}
Repository navigation
dht: no full republish after a lagged event stream; no staker-set resync after an extended watcher outage #1561
Two untracked resilience gaps in the DHT layer, both explicitly deferred in code comments that cite no issue:
Republish sweep after a lagged event stream — crates/node/src/dht/publish.rs:302: on broadcast::error::RecvError::Lagged, the republisher cannot run a full sweep because the cache exposes no hash-enumeration API (the comment says "filed for follow-up", but no such issue exists). Missed hashes stay undiscoverable until cold-start or an operator restart.
add a cache iter_hashes-style API and a full republish pass on Lagged
Staker-set resync after an extended watcher outage — crates/node/src/dht/chain_staker_set.rs:73: "A getActiveNodes resync-on-extended-outage path is a follow-up." The cached active-staker set drifts silently; decdn_staker_set_watcher_resolve_failures_total surfaces the window but nothing closes it.
trigger a paged getActiveNodes re-enumeration when the watcher recovers after a gap
Two deferred resilience gaps in the DHT layer, each backed by a code comment that cites no tracking issue — this issue closes that gap. The gaps are independent but both relate to stale/undiscoverable state after an interruption: (1) hashes become undiscoverable after a Lagged broadcast event because the republisher has no way to enumerate all cached hashes, and (2) the active-staker set drifts silently after a chain-watcher outage because no resync path is triggered on recovery.
📊 Assessment
Dimension
Value
Reasoning
Type
Task
Two follow-up implementation tasks explicitly deferred in code; not a bug in current design intent
Labels
technical, medium, rust (already applied)
Accurate — Rust implementation work, medium urgency (correctness gap but not data loss)
Coding agent
Suitable
Both sub-tasks have pinpointed file locations, clear API shapes to add, and defined trigger conditions; self-contained scope with no architectural decisions needed
🔗 Similar issues
No similar issues found.
💡 Notes and suggestions
Sub-task 1 — Cache iter_hashes + republish on Lagged (crates/node/src/dht/publish.rs:302)
Add an iterator/stream API to the cache layer (iter_hashes or equivalent) that enumerates all currently-held content hashes without requiring the caller to track them externally.
In the RecvError::Lagged arm, call a full republish sweep using that API instead of skipping.
Confirm the sweep is bounded (rate-limited or chunked) to avoid a thundering-herd on restart.
Test: simulate a lagged receiver, assert hashes remain discoverable in the DHT after recovery.
Sub-task 2 — Staker-set resync after watcher gap (crates/node/src/dht/chain_staker_set.rs:73)
When the watcher recovers after a gap, trigger a paged getActiveNodes re-enumeration to rebuild the staker set from chain state.
The existing decdn_staker_set_watcher_resolve_failures_total metric already surfaces the gap window — use it (or the recovery event) as the trigger.
Consider a configurable outage threshold before triggering resync to avoid noisy short blips.
Test: mock an extended watcher outage, verify the staker set converges to chain truth after recovery.
Suggested checklist:
Add iter_hashes (or equivalent) to the cache API
Handle RecvError::Lagged with a full republish sweep in publish.rs
Add resync-on-recovery path in chain_staker_set.rs
Unit/integration tests for both paths
Confirm no existing metric/alert gaps after the fixes
Generated by Agentic Triage for #1561 · sonnet46 · 12.7 AIC · ⌖ 5.61 AIC · ⊞ 6K · ◷
Add this agentic workflow to your repo
To install this agentic workflow, run
gh aw add githubnext/agentics/workflows/issue-triage.md@94ec5db57374c5b04a4b8eef8b4413f9af44d63f
Activity
github-actions commentedon Aug 1, 2026
🎯 Triage report
Two deferred resilience gaps in the DHT layer, each backed by a code comment that cites no tracking issue — this issue closes that gap. The gaps are independent but both relate to stale/undiscoverable state after an interruption: (1) hashes become undiscoverable after a
Laggedbroadcast event because the republisher has no way to enumerate all cached hashes, and (2) the active-staker set drifts silently after a chain-watcher outage because no resync path is triggered on recovery.📊 Assessment
technical,medium,rust(already applied)🔗 Similar issues
No similar issues found.
💡 Notes and suggestions
Sub-task 1 — Cache
iter_hashes+ republish onLagged(crates/node/src/dht/publish.rs:302)iter_hashesor equivalent) that enumerates all currently-held content hashes without requiring the caller to track them externally.RecvError::Laggedarm, call a full republish sweep using that API instead of skipping.Sub-task 2 — Staker-set resync after watcher gap (
crates/node/src/dht/chain_staker_set.rs:73)getActiveNodesre-enumeration to rebuild the staker set from chain state.decdn_staker_set_watcher_resolve_failures_totalmetric already surfaces the gap window — use it (or the recovery event) as the trigger.Suggested checklist:
iter_hashes(or equivalent) to the cache APIRecvError::Laggedwith a full republish sweep inpublish.rschain_staker_set.rsAdd this agentic workflow to your repo
To install this agentic workflow, run