Uh oh!
There was an error while loading. Please reload this page.
feat: carry the PEX-known DIG peer count, not just the connected one - #210
Conversation
MichaelTaylor3d
commented
Aug 10, 2026
Lane report — and my brief's premise was WRONGThe field shipped, but not from Why: What it used instead: Also relevant: the node's PEX engine is wired only to the mTLS node↔node listener. Relay-discovered The field, for the #2569 lanepub known_dig_peer_count:Option<u32>,// wire key: "known_dig_peer_count"
Render as "known" / "discovered", never "total" or "network size". The pair is the diagnostic:
Version-claim collision — the recurring shape
Two concurrent branches independently claiming the same version is now the third time this shape has Deliberately left undonedig-node still pins GatesContract: fmt, clippy Four mutations, each applied to a committed tree by file copy and restored:
UnverifiedThe field's live value — everything is proven by test; nothing was measured against a running The investigation answer, and it is bigger than this ticket(a) — introductions arrive and every dial fails. Root cause: the peers advertise IPv6-only |
…eason field Bump the workspace version to 0.113.0 (0.112.0 is claimed by the open #210 branch).
Refs dig_ecosystem#2570 Co-Authored-By: Claude <noreply@anthropic.com>
…holds `control.peerCounts` could say a node has zero DIG peers but not why. A node connected to nobody and a node with nobody to connect to render as the same zero, yet they are different faults: the first is reachability, the second is discovery. This adds `known_dig_peer_count` -- the size of the gossip layer's discovered-peer address book (`GossipStats::known_addresses`), sampled in the same pool pass that already reads the connected count, and surfaced on `control.peerStatus` as `known_peers` and on `dign peers` beside it. The count is sourced from the address book, never from `connected_peers`: aliasing the two would reproduce the exact ambiguity the field removes, so the snapshot test drives them to different values with the connected count at zero. An unsampled count reports `null`, tracked by an explicit sampled flag rather than a sentinel, because every u64 is a plausible peer count and a zero would claim an empty address book nobody looked at. It is documented -- in SPEC 18.6c and at every rendering -- as ONE node's local view and a lower bound, never the size of the network. Refs dig_ecosystem#2570 Co-Authored-By: Claude <noreply@anthropic.com>
Refs dig_ecosystem#2570 Co-Authored-By: Claude <noreply@anthropic.com>
d351d48 to
92c2b77CompareUh oh!
There was an error while loading. Please reload this page.
…eason field Bump the workspace version to 0.113.0 (0.112.0 is claimed by the open #210 branch).
… watch (#212) * chore: open #2609 lane Fix the wallet sync phase never settling on a default install. * fix(wallet): report an honest phase when custody has nothing to watch An empty puzzle-hash set never runs a catch-up, so initial_sync_complete cannot latch while the peak advances. Add SyncPhase::NoAddressesToWatch, gated on a writing peer AND a measured-zero watched set. * test(wallet): prove the default-install phase settles through the real supervisor * docs(spec): specify no_addresses_to_watch and the watched_addresses reason field Bump the workspace version to 0.113.0 (0.112.0 is claimed by the open #210 branch). * docs(devlog): record why initial_sync_complete cannot latch on a default install * docs(spec): clarify no_addresses_to_watch precedence Co-authored-by: MichaelTaylor3d <5665004+MichaelTaylor3d@users.noreply.github.com> * test(wallet): make the measured-vs-unmeasured watched set load-bearing Review measured that replacing == Some(0) with unwrap_or(0) == 0 left the whole suite green: the only unmeasured test also left may_write false, so the trust condition rejected it a step earlier. Split set_subscription into set_trust + set_watched so the real in-between state (trust settled, set not yet resolved) is reachable, and add a test for it. The mutation now fails that test. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
DO NOT MERGE — work in progress, lane is live
Early draft per the standing directive that all work carries a PR from the start.
Intent (#2570)
Surface the number of DIG-network peers this node knows of, not only those it is connected to.
PeerCountsResultcurrently carriesdig_peer_count(connected) andchia_peer_count. The node alreadycomputes
known_count()via PEX, but the contract does not carry it, so dig-app cannot render it. On mymachine that is the difference between a useless number and a useful one:
connected_peers: 0while therelay reports 6.
PEX already exists on both sides — nothing is being built here. The relay has
dig-relay/src/pex.rs(RLY-008), embeddingdig_pex::PexEnginein its introducer role, one engine pernetwork_id, advertising only first-hand peers and never re-advertising node-sent data ("an introduceris not a gossip amplifier"). The node has the node↔node half (#166). This change is exposure only.
The honesty constraint that decides the field name
No count anywhere is "the total DIG network." The node's
known_count()is peers this node haslearned of — a lower bound from one node's view. The relay's is peers registered with that relay —
nodes on another relay, or none, are invisible to it. Naming either "total network peers" asserts global
knowledge from a local view, the same class of false claim as reporting a wrong balance. The field is
named and documented as view-scoped, and its doc states what it does NOT include.
Existing
Optionsemantics are preserved: the contract already documents "0is an observed zero;nullis unobservable" — an unknown count must not render as zero.Also being answered with evidence
connected_peers: 0againstrelay.peer_count: 6has two very different explanations: introductionsarriving and every dial failing, or introductions never arriving at all. The lane has a live node and
logs and is measuring which, rather than inferring.
Rendering belongs to #2569's lane, which owns the header — not this branch.
Refs #2570, #2569.