feat(peer): register accepted inbound peers in the connected pool (#3124) - #402
Draft
MichaelTaylor3d wants to merge 1 commit into
Draft
feat(peer): register accepted inbound peers in the connected pool (#3124)#402MichaelTaylor3d wants to merge 1 commit into
MichaelTaylor3d 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>
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.