Skip to content

XvB 'stats updated' timestamp is bumped every algo cycle, not when xmrvsbeast.com is actually fetched — misleading freshness #136

@VijitSingh97

Description

@VijitSingh97

Summary

The UI shows "Stats fetched from xmrvsbeast.com (Updated: …)", but that timestamp (xvb_last_update) is refreshed whenever any XvB state field changes — including the donation_fraction the algo controller writes every cycle — even though the real xmrvsbeast.com fetch only happens every 10th iteration.

Evidence

  • service/storage_service.py update_xvb_stats — sets state["xvb"]["last_update"] = time.time() whenever stats_updated (which includes a donation_fraction write).
  • service/algo_service.py — writes donation_fraction every cycle.
  • service/data_service.py — the actual xvb_client.get_stats() fetch runs only every 10th loop iteration.
  • UI: web/static/components.mjs → "Updated: ${hr.xvb_updated}" ← xvb_last_update (metrics.py, views.py).

Impact

If xmrvsbeast.com is unreachable for hours, the displayed "Updated" time still ticks fresh every ~30s–10min because the local controller keeps writing donation_fraction. The operator gets no signal the XvB data is stale — defeating the timestamp's purpose.

Suggested fix

Use a separate xvb_fetched_at key set only on a successful xvb_client.get_stats, and surface that in the UI; or exclude donation_fraction (and other purely-local writes) from the last_update bump.

Related

Distinct from #99 (hashrate-loss flagging).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdashboardMining dashboard web UI

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions