Skip to content

Blacklist enforcement failures are unobservable after initial sync #1319

Closed

Description

@yigitdot

Split out of #1315 review (#1283 follow-up).

BlacklistSink::on_tick_complete (crates/node/src/blacklist_watcher.rs:221) converts a failed re-scope into a tick error only while the initial-sync gate is pending:

self.last_rescan = clean.then(Instant::now);
if !clean && self.initial_sync.pending() {
    anyhow::bail!("initial ContentBlacklist replay/re-scope could not enforce every entry");
}

Once the gate has fired, pending() is permanently false, so a pass that cannot enforce every entry returns Ok(()). run_tick succeeds, established stays true, on_backoff never fires.

Concrete scenario: node boots, first replay is clean, gate fires Ok, router opens. An hour later a HashBlacklisted arrives for an in-scope hash the node holds, and evict fails repeatedly (disk error) or scope_check returns None on RPC failures. rescan returns clean = false and the node retries at poll cadence forever — correct retry behavior — but the blob stays servable and slashable (SlashJudge.submitBlacklistChallenge), and the whole blacklist_watcher_* family added in #1315 reads healthy: restarts_total 0, down_seconds 0.

rescan also logs only the positive evicted count, never the failure count, so no log line names how many entries went unenforced.

This is pre-existing sink behavior, not introduced by #1315 — but #1315 is what puts an operator-facing alerting surface on top of it. Its docstrings have been narrowed (in d005b9e) to say the family tracks chain-read outages only, so nothing currently overclaims. The gap itself remains.

Proposed: a blacklist_enforcement_failures counter fed from rescan's Recheck::Failed arm, so the slashable condition has a metric of its own. Worth deciding whether it should also feed the downtime family or stay a separate counter — they answer different questions (is the chain readable vs is the deny-set enforced).

Found by multi-agent review of #1315; two reviewers converged on it independently.

Activity

  1. added
    kind:feature
    rust
    prio:high
    on Jul 19, 2026
  2. self-assigned this
    on Jul 19, 2026
  3. thiras commented on Jul 19, 2026

    @thiras
    Contributor

    Resolved by #1325 (merged to main as 0b5ce92), which addressed blacklist enforcement failures being unobservable after initial sync (now the blacklist_enforcement_failures_total counter) as part of the uniform six-watcher observability batch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind:featureprio:highrust

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions