Skip to content

web(currency_info): report LIVE ratchet share_version, not static 36 - #491

Merged
frstrtr merged 1 commit into
masterfrom
dashboard/currency-info-live-share-version
Jun 25, 2026
Merged

web(currency_info): report LIVE ratchet share_version, not static 36#491
frstrtr merged 1 commit into
masterfrom
dashboard/currency-info-live-share-version

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Problem

rest_web_currency_info set share_version from a static coin switch — LTC/DOGE/BTC always 36, DASH 16. The bundled @c2pool/sharechain-explorer consumes 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_info would report 36, 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_version from the node-live m_cached_share_version, which is fed from the AutoRatchet (set_cached_share_version, updated on every PPLNS work refresh) — the same internal state the share-selection path uses. DASH keeps its static 16: 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.

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.
@frstrtr
frstrtr merged commit 9445b46 into master Jun 25, 2026
21 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant