web: per-node topology auto-detect + per-coin stats seam (D0.2/D0.3) - #324
Merged
Conversation
…D0.2/D0.3) Adds GET /api/node_topology, the truthful per-node topology surface for the 6-coin fleet (LTC/DOGE/BTC/DGB/DASH/BCH). Each node runs a different coin set + embedded daemons; the dashboard must reflect THAT node's REAL shape, not a hardcoded LTC+DOGE assumption. D0.2 (auto-detect): rest_node_topology() derives the coin set from live state -- the keys of the coin-peer map (an LTC node also runs embedded DOGE, etc.) plus this node's own chain (m_blockchain) -- and labels the primary coin with the real is_embedded()/has_rpc() flags from the connected coin node. No baked -in coin shape. D0.3 (seam): optional node_topology_fn provider hook. When the wiring layer registers one it supplies richer per-coin stats (synced flag, per-coin hashrate) and overrides the auto-detect; when unset the auto-detect keeps the endpoint truthful. Clean override-or-detect seam for each coin to feed its own real stats. Purely additive. Web/diagnostic layer only -- no consensus, sharechain, or wire change. web_server.cpp.o compiles clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
frstrtr
added a commit
that referenced
this pull request
Jun 23, 2026
…D0.2/D0.3) (#324) Adds GET /api/node_topology, the truthful per-node topology surface for the 6-coin fleet (LTC/DOGE/BTC/DGB/DASH/BCH). Each node runs a different coin set + embedded daemons; the dashboard must reflect THAT node's REAL shape, not a hardcoded LTC+DOGE assumption. D0.2 (auto-detect): rest_node_topology() derives the coin set from live state -- the keys of the coin-peer map (an LTC node also runs embedded DOGE, etc.) plus this node's own chain (m_blockchain) -- and labels the primary coin with the real is_embedded()/has_rpc() flags from the connected coin node. No baked -in coin shape. D0.3 (seam): optional node_topology_fn provider hook. When the wiring layer registers one it supplies richer per-coin stats (synced flag, per-coin hashrate) and overrides the auto-detect; when unset the auto-detect keeps the endpoint truthful. Clean override-or-detect seam for each coin to feed its own real stats. Purely additive. Web/diagnostic layer only -- no consensus, sharechain, or wire change. web_server.cpp.o compiles clean. Co-authored-by: frstrtr <frstrtr@users.noreply.github.com>
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.
What
Adds
GET /api/node_topology— the truthful per-node topology surface for the 6-coin fleet (LTC/DOGE/BTC/DGB/DASH/BCH). Each node runs a different coin set + embedded daemons; the dashboard must reflect that node's real shape, not a hardcoded LTC+DOGE assumption.D0.2 — auto-detect
rest_node_topology()derives the coin set from live state:m_blockchain), always presentis_embedded()/has_rpc()flags from the connected coin nodeNo baked-in coin shape.
D0.3 — seam
Optional
node_topology_fnprovider hook. When the wiring layer registers one it supplies richer per-coin stats (synced flag, per-coin hashrate) and overrides the auto-detect; when unset the auto-detect keeps the endpoint truthful. Clean override-or-detect seam for each coin to feed its own real stats.Scope / safety
Purely additive — new endpoint + new optional hook, no change to existing endpoints. Web/diagnostic layer only — no consensus, sharechain, or wire change. Fenced to
core/web_server.{hpp,cpp}.web_server.cpp.ocompiles clean locally.Follows #304 (un-stub) on the dashboard-steward plan: D0.1 ✓ → D0.2/D0.3 (this) → D-LTC V36 ratchet visibility next.