Skip to content

dashboard: height-stall trigger restarts a wedged monerod, sharing one restart budget (#4076 remainder) #4192

Closed

Description

@pithead-architect

What's the problem

The remainder of pithead#4076 after PR #4093 (merged: monerod_redial.py re-dials monerod after any Tor start and restarts a peerless monerod, with REDIAL_SETTLE_SEC, WATCHDOG_GRACE_SEC, COOLDOWN_SEC 30 min, DAILY_CAP 3). A monerod with live outgoing peers that stores no block still never recovers on its own: the 2026-11-14/15 wedge ran 06:21-06:39 (18 min) with three peers announcing a 32-38 block lead, and any non-zero peer reading clears both the pending re-dial (monerod_redial.py:75) and the zero-peer clock behind the peerless verdict (monero_health.py:80). MoneroChainHealth already computes stalled (STALLED_SEC 30 min, monero_health.py:24) but nothing acts on it, and its clock runs through a Tor outage. The owner moved this remainder to v2.0.5 with #4076 on 2026-11-16.

What it impacts

Every appliance whose node wedges while its connections stay open: rigs hash a stale tip and revenue is lost until a human restarts monerod. The healer's own restart and the redial watchdog can also cycle monerod back to back because their budgets are separate.

How I found it

This is a split chunk of #4076 handed to a local session whose group was too large; the acceptance items are the ones appended to #4076 from the 2026-11-14/15 incident evidence comment and restated in the owner's 2026-11-16 ruling. Verified against develop 67504c5.

How important is it

P1 user-facing, v2.0.5 scope by owner direction (inherited from #4076).

Acceptance criteria

Possible solutions

  • Extend MonerodRedial with the stall rule using the verdict plus target height from the same get_info reading; all thresholds are module-level named constants.
  • Extract the cooldown + rolling daily counter from monerod_redial.py into a small shared limiter consumed by the healer too. tor_heal.py is being rewritten for the NEWNYM ladder on PR Tor auto-heal: advance past a rejected NEWNYM to state reset and restart (#4075) #4095 — check its state first and land on top of whatever merged.
  • Read "Tor proven" from the existing Tor probe surfaces (the healer's control-port reads, or Tor's bootstrap/completed-circuit log lines); decide one and document it.
  • Unit tests under dashboard/tests/service/health/, red before green after.

Parent: #4160

Worker brief: Test tier: tier4-e2e (fault phase) plus tier-1 pytest for every named branch (these are pure-logic thresholds with an injectable clock, so each criterion in the issue body gets a dashboard/tests/service/health/ case that is red without the fix).

Objective: the #4076 remainder exactly as listed in the acceptance criteria — height-stall trigger (10 min named constant, target above height), Tor-proven gate (bootstrap 100% plus a completed-circuit reading for 5 consecutive minutes, clock starts when Tor becomes proven), longer threshold during initial sync or a large height gap, short peer gaps pause without resetting, one shared cooldown + daily counter across this trigger, the #4093 peerless watchdog and tor_heal.py's #972 monerod cycle, and a pre-action record of height, target height and peer counts (no addresses).

Start by checking PR #4095 (#4075, open at split time) — it rewrites tor_heal.py, the file the healer's #972 restart lives in; land on top of whatever merged. Keep the #2749 guard and remote-mode rule; never touch P2Pool or chain data; ship the trigger for all roles (the owner's CI-role question was never made a criterion — the default is to include CI instances). Update the docs that describe #972 and the redial behaviour, not the code with comments. The PR body carries Closes #4076 on a line of its own plus its own child issue's keyword, and quotes the tier4-e2e job on the final head with the unedited bench-ci evidence block.

Activity

  1. added this to the v2.0.5 milestone on Nov 17, 2026
  2. added
    bug
    dashboard
    appliance
    P1-user-facing
    needs-triage
    size:M
    on Nov 17, 2026
  3. pithead-developer commented on Nov 19, 2026

    @pithead-developer
    Contributor

    Grouped with #4191, but PR #4256 does not close it: the worker left it out. Released for its own pick.

  4. pithead-developer commented on Nov 22, 2026

    @pithead-developer
    Contributor

    Grouped with #4346, but PR #4350 does not close it: Already delivered by merged PR #4200 (its body carried Closes #4192), so no further change is needed here; the issue is still open and can be closed.. Released for its own pick.

  5. pithead-developer commented on Nov 22, 2026

    @pithead-developer
    Contributor

    Verified as delivered, closing.

    PR #4200 (merged 2026-11-21, commit d8de0ad, on develop-v2.0.5) implements every acceptance criterion of this issue: the 10-minute height-stall restart that fires with live outgoing peers, the Tor-proven gate (bootstrap 100% plus a completed-circuit reading for 5 consecutive minutes, with the clock starting when Tor becomes proven, never when the height last moved), the longer sync threshold during initial sync or a large target gap, short peer gaps that pause the stall clock without resetting it, one shared cooldown and daily counter covering the stall trigger, the #4093 peerless watchdog and the tor healer's #972 monerod cycle, and the pre-action audit of height, target height and peer counts. The unit tests cover each named branch red-to-green, and the tier4-e2e monero-stranded job on the final head is green with every row quoted in the PR.

    No further change is needed here (runner note of 2026-11-22).

  6. pithead-developer commented on Nov 22, 2026

    @pithead-developer
    Contributor

    Questions before work continues (answer here, then remove the question label):

    The local session reported this issue too big and proposed a split, but the runner refused it: the parent issue is unreadable, closed or not the runner's. Split it by hand or give the local session a narrower brief.

  7. added
    question
    on Nov 22, 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

    P1-user-facingappliancebugdashboardneeds-triagequestionsize:M

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions