feat(peer): register accepted inbound peers in the connected pool (#3124) - #402
feat(peer): register accepted inbound peers in the connected pool (#3124)#402MichaelTaylor3d wants to merge 1 commit into
Conversation
…124) dig-node's mTLS peer-RPC listener accepted, authenticated and served inbound peers while registering none of them, so `connected_peers` under-reported every inbound peer. It now adopts each accepted connection through dig-gossip's direct-inbound entry point for the life of its serve loop, and stops counting it when that loop returns. Registers BY HANDLE: the serve loop needs `&mut PeerSession`, so handing the session to the pool would buy the count and stop serving the peer. Adoption is best-effort -- a pool refusal is an accounting decision and never a reason to refuse service to a peer whose handshake already succeeded. Refs: DIG-Network/dig_ecosystem#3124 Co-Authored-By: Claude <noreply@anthropic.com>
Ownerless and rotted, not subsumed — measured 2026-08-31Reconciled on a wake with no live lane on this branch. Recording the state so the next lane resumes Not subsumed. I checked whether Rotted. Last touched 2026-08-29T04:55Z; Two things to do at rebase time, both of which have bitten this repo this week:
Not selectable right now. dig-node is single-writer and the lane is held by the |
DO NOT MERGE — WIP, gate round not yet run, and BLOCKED on a dependency.
Consumer half of dig_ecosystem#3124 — https://github.com/DIG-Network/dig_ecosystem/issues/3124
Depends on DIG-Network/dig-gossip#83, which adds the entry point this PR calls.
What
serve_peer_rpc_listener_withaccepted, authenticated and served every inbound peer while registeringnone of them, so
connected_peersunder-reported every one. It now adopts each accepted connectioninto the dig-gossip pool for the life of its serve loop, and releases the slot when that loop returns.
BLOCKER — the rev pin is temporary
crates/dig-node-core/Cargo.tomlcurrently pins dig-gossip to this lane's BRANCH commit(
f21f993) so the wiring could be compiled and proven. It must be re-pinned to dig-gossipmainafter #83 merges, before this leaves draft.
dig-gossip is not published on crates.io (
index.crates.io→ 404), so a version dependency is notavailable today; the
git =pin is pre-existing (NC-7 / CLAUDE.md §3.6) and this PR does not resolveit. Flagged for the orchestrator rather than fixed here — a first publish of the crate is irreversible
and well outside this ticket.
Status
Blast radius: to be stated before this leaves draft.