Skip to content

P2Pool with zero peers for a bounded window is restarted, with backoff, and says so at the cap #4077

Closed

Description

@pithead-architect

What's the problem

Second failure mode found during #4045 (owner comment 2026-11-12, fleet backup pool on the 2.0.3 cut): P2Pool logged "no connections to other p2pool nodes" about 180 times an hour since 2026-11-11 10:04Z with no new sidechain tip, while monerod and Tor were healthy. Two other CI stacks kept their peers. A docker restart p2pool is the manual cure; nothing automated watches P2Pool peers.

What it impacts

Mining revenue and pool validity: a peerless P2Pool mines a private sidechain (the CI box did exactly that after a restart, until fresh-state Tor let it rejoin at 01:31Z, ~16 minutes after the restarts — so the watchdog needs patient backoff, not a single give-up). Release-blocker context for v2.0.4.

How I found it

Owner's CI monitoring comments on #4045 (2026-11-12): log counts, the recovery timeline, and the comparison with two unaffected stacks. No code defect located — the watchdog simply does not exist.

How important is it

Release-blocker for v2.0.4 by owner direction (2026-11-12): the ladder must cover "P2Pool with zero peers for more than N minutes: restart P2Pool".

Acceptance criteria

  • P2Pool reporting zero peers for a bounded window (fixed, documented bound) triggers a P2Pool container restart, with a cooldown, a per-day cap, an audit entry and an owner-visible log line; after the cap it stops and says so.
  • Recovery is judged on sidechain tip progress resuming, not just the container being up; while the sidechain is syncing after a restart the watchdog waits (the real-world rejoin took ~16 min), with bounded retries and backoff before a further restart.
  • A remote/absent P2Pool (merged-mining-off modes) is never touched.
  • Unit tests red without the fix; an e2e fault scenario cuts all P2Pool peers and proves the sidechain tip resumes unattended within the bounded window; a KVM leg for the P2Pool-peer-loss mode.

Possible solutions

Parent: #4045

Worker brief: Test tier: tier4-e2e. Add a bounded P2Pool peer watchdog in the dashboard service: zero reported peers for a fixed window (documented constant; cooldown + per-day cap + audit + one-off owner-visible log) restarts the p2pool container via the same docker control API tor_heal.py uses; after a restart, judge recovery on sidechain tip progress with patient bounded backoff (real rejoin took ~16 min), and at the cap stop and say so. Never touch a box whose mode has no local P2Pool. Find the existing P2Pool status/peer source under dashboard/mining_dashboard (collector/service) and reuse it — do not add a new daemon probe path. Tests: dashboard/tests/service/health cases (peerless window → restart; still peerless with backoff → second restart within cap; cap → stop+warn) red before the fix; an e2e fault scenario cutting all p2pool peers → tip resumes unattended within the window; a KVM guest leg. Do NOT touch tor_heal.py's ladder, monerod watchdog, config templates or alert UI — sibling chunks. No comments in code; document the new bound in the docs page describing auto-heal.

Activity

  1. added this to the v2.0.4 milestone on Nov 13, 2026
  2. added
    needs-triage
    size:M
    on Nov 13, 2026
  3. pithead-developer commented on Nov 15, 2026

    @pithead-developer
    Contributor

    Merged in #4098.

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

    needs-triagesize:M

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions