From c39aa5248b6320a412746157778c4b5bc035770a Mon Sep 17 00:00:00 2001 From: frstrtr Date: Thu, 25 Jun 2026 15:05:45 +0000 Subject: [PATCH] web(currency_info): report LIVE ratchet share_version, not static 36 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rest_web_currency_info hardcoded share_version via a static coin switch (LTC/DOGE/BTC -> 36). The sharechain-explorer uses this field to classify share cells, so during the V35->V36 cross a still-VOTING node — actually producing V35 shares — would have its live V35 cells misclassified as V36. That is a lie about the crossing state (charter #3: operators must see the ratchet truthfully). Source it from the node-live m_cached_share_version (fed from the AutoRatchet via set_cached_share_version) for the ratcheting coins. DASH (v16, separate activation latch, not driven by the LTC AutoRatchet) keeps its static protocol version. Web/diagnostic layer only — no consensus path touched. --- src/core/web_server.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/core/web_server.cpp b/src/core/web_server.cpp index 65eb14cb1..7950c03ad 100644 --- a/src/core/web_server.cpp +++ b/src/core/web_server.cpp @@ -4813,13 +4813,19 @@ nlohmann::json MiningInterface::rest_web_currency_info() // p2pool share version for the current coin — consumed by the // bundled @c2pool/sharechain-explorer to classify share cells. - // Dash = v16, LTC/DOGE/BTC = v36. + // For the V35/V36-ratcheting coins this MUST be the node's LIVE + // ratchet-selected version (m_cached_share_version, fed from the + // AutoRatchet), never a static 36: during the V35->V36 cross a node that + // is still VOTING is actually producing V35 shares, and reporting 36 would + // make the explorer misclassify live V35 share cells as V36 — a lie about + // the crossing state. DASH (v16, non-ratcheting on this path) keeps its + // protocol version since the LTC AutoRatchet does not drive its cache. switch (m_blockchain) { case Blockchain::DASH: result["share_version"] = 16; break; case Blockchain::LITECOIN: case Blockchain::BITCOIN: case Blockchain::DOGECOIN: - default: result["share_version"] = 36; break; + default: result["share_version"] = m_cached_share_version; break; } // ─── Per-coin explorer map (operator 2026-06-23: each coin = a distinct