Skip to content

dash-spv/sml: stranded filter ranges, header-sync wedges, and crafted-message masternode stalls #977

Description

@bfoss765

Found by the 2026-08-19 merged-PR audit; robustness gaps in code merged via #964/#950/#960/#934:

  • Filter-header hole repair: a storage-write failure permanently strands the range below target — the watermark advances before the fallible work, and tick errors are swallowed.
  • Header-sync wedges: a window-skip strand, and a pending-announcement retry loop with no exit while Syncing.
  • Masternode QRInfo hardening (both empirically reproduced): unvalidated quorum_index and a cl-sig map keyed from unvalidated wire data — a single crafted message wedges masternode sync (fail-closed but permanent until restart).
  • Silent empty-filter read: a missing segment file reads as all-empty in release builds — the debug guards should be release errors.
  • Smaller: take-then-fail header drop, zero-peer tick guard.

A complete fix exists on branch fix/sync-robustness-and-masternode (former PR #972, closed to keep the open-PR queue focused on migration-critical work; one CodeRabbit minor open — failed-init atomicity test coverage). Reopen as-is when there is review bandwidth.

Related follow-ups registered during review: sibling requeue holes in the blocks/filters pipelines (same class as the return_unsent fix in this branch), and the receive_headers pre-validation locator advance (separate ticket-worthy).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions