web(currency_info): report LIVE ratchet share_version, not static 36 - #491
Merged
Merged
Conversation
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.
This was referenced Jun 25, 2026
Merged
frstrtr
added a commit
that referenced
this pull request
Jun 26, 2026
…ITIVE) (#518) currency_info.share_version must track the LIVE ratchet (m_cached_share_version), never a static 36 (#491): a VOTING LTC node on V35 reporting 36 makes the sharechain-explorer misclassify live V35 cells as V36. Dash stays static v16 (LTC AutoRatchet cache must not bleed into a Dash dashboard). v36_status.auto_ratchet.v36_active must derive from the live latch (m_cached_share_version >= 36), not a frozen stub (#499), so a transient sampling dip cannot misreport the V35->V36 crossing state. Test-only, no runtime change. 13/13 green. 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.
Problem
rest_web_currency_infosetshare_versionfrom a static coin switch — LTC/DOGE/BTC always36, DASH16. The bundled@c2pool/sharechain-explorerconsumes this field to classify share cells.During the live V35→V36 cross (LTC prod #288), a node that is still VOTING is actually producing V35 shares — but
/currency_infowould report36, so the explorer misclassifies live V35 cells as V36. That is a dashboard lie about the crossing state — exactly the class of bug this lane exists to kill (charter #3: operators must see the ratchet truthfully).Fix
Source
share_versionfrom the node-livem_cached_share_version, which is fed from theAutoRatchet(set_cached_share_version, updated on every PPLNS work refresh) — the same internal state the share-selection path uses. DASH keeps its static16: it is non-ratcheting on this path (separate activation latch, #466) and the LTC AutoRatchet does not drive its cache, so the live value would default-lie there.Scope
Web/diagnostic layer only (
core/web_server.cpp, one switch arm). No consensus path touched. Built clean locally.