Skip to content

Prober: verify allowlist + online-ever relays (capped per sweep) #33

Description

@melvincarvalho

Expand the prober's target set from allowlist-only to allowlist + already-verified relays (those with checksOnline ≥ 1), capped per sweep. Keeps the known-good ~725 fresh daily; never dials brand-new unverified harvested candidates — so a newly-published relay list can't make us dial arbitrary hosts (no amplification, no new attack surface). Discovery stays a candidate list; promotion to probed is deliberate.

Changes

  • selectTargets(allowlist, candidates, cap) (pure) — union, screened via safeRelayUrl, capped.
  • sweepTargets(db, cfg) — allowlist ∪ relays where checksOnline ≥ 1 (stalest first), capped.
  • sweepOnce uses it. proberConfig.cap (env PROBE_MAX, --max, default 1000).
  • USAGE + .env.example.

Acceptance

  • Sweep probes ~725 (allowlist + verified), not brand-new candidates; bounded at cap.
  • selectTargets unit-tested (union, screen, cap, allowlist always included). npm test green.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions