Skip to content

Event log: record XvB mode switches and rig presence changes #4434

Backlog

Description

@pithead-architect

What's the problem

Part of #4431. Two kinds of change the owner wants in the Event log have no record:

  • XvB switches. A switch of XvB mode or tier is only a log line in dashboard/mining_dashboard/service/xvb/algo_service.py. xvb_history samples the mode about every 5 minutes, so a switch inside an interval leaves no trace.
  • Rig presence. A rig joining, leaving, going offline or recovering is detected in service/workers/worker_presence.py, but only the current state is kept.

What it impacts

Operators who want to see when the box switched between P2Pool and XvB, or when a rig dropped off.

How I found it

A read-only read of develop at 32d9834 and develop-v2.1.0 at bfd061f (the files above).

How important is it

Low to medium. Blocked on #4432 (the store).

Acceptance criteria

  • Each applied change of XvB mode or tier is one entry, "XvB mode changed from to ", with label XvB and severity info. It is written when the algorithm applies the change, not per sample.
  • Each rig presence transition (joined, left, offline, recovered) is one entry with label Rigs, naming the rig by its dashboard display name and never by hostname or address.
  • A rig that changes state more than 6 times in an hour produces one "flapping" entry for that hour instead of one row per change.
  • Tests cover:
    • one entry per XvB switch;
    • no entry when a 5-minute sample sees no change;
    • each presence transition;
    • the flapping rule.
  • make test, make test-patch-coverage and make lint-file-budget pass.

Possible solutions

  • Record at the point the change is applied (recommended). XvB in the algorithm's apply step, presence in the presence edge.
  • Derive from xvb_history and the worker table at read time. It needs no new writes, but it misses switches and flaps inside the sampling interval.

Activity

  1. added this to the v2.1.0 milestone on Nov 24, 2026
  2. added
    enhancement
    dashboard
    size:S
    on Nov 24, 2026
  3. pithead-developer commented on Nov 25, 2026

    @pithead-developer
    Contributor

    Blocked on #4432. Issue #4434 (record XvB mode switches and rig presence changes in event log) is blocked on #4432 (the event_log store), which is still open with all 4 sub-issues unimplemented: no event_log table, no record_event helper, no error episodes, no /api/events read path. Codebase confirms zero event_log references. Work cannot proceed until #4432 lands.

    The runner resumes this issue when that one closes.

  4. added
    blocked
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockeddashboardenhancementsize:S

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions