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).
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 thedonation_fractionthe algo controller writes every cycle — even though the real xmrvsbeast.com fetch only happens every 10th iteration.Evidence
service/storage_service.pyupdate_xvb_stats— setsstate["xvb"]["last_update"] = time.time()wheneverstats_updated(which includes adonation_fractionwrite).service/algo_service.py— writesdonation_fractionevery cycle.service/data_service.py— the actualxvb_client.get_stats()fetch runs only every 10th loop iteration.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_atkey set only on a successfulxvb_client.get_stats, and surface that in the UI; or excludedonation_fraction(and other purely-local writes) from thelast_updatebump.Related
Distinct from #99 (hashrate-loss flagging).