Skip to content

DIP-0036 step 4: worker-side [moderation] for stored replicas (policy_refusal) #444

Open

Description

@ralyodio

Steps 1-3 of DIP-0036 have shipped:

Step 4 is still open: a storage worker refusing to hold replicas of labelled content, emitting policy_refusal so the refusal isn't counted as a challenge failure, plus a count of refused replicas in hosting_push_status.

Why it's separate: workers store blake3 chunks, not files, so a worker has to reassemble a site's files (or get the per-file SHA-256s from the manifest) before it can ask a labeler. The replicate path is hosting/mod.rs repair_once → replicate, and apply_record_capped is the natural place to drop labelled records.

🤖 Generated with Claude Code

Activity

  1. ralyodio commented on Nov 25, 2026

    @ralyodio
    CollaboratorAuthor

    Step 4 shipped in #497 (merged, 2a0d79f7), for sites up to 1 GiB. It goes out in v0.3.113. Leaving this open for the two parts that are not done.

    Done

    • A hosting worker judges a new copy after the chunks arrive and before it holds or announces it, by reassembling each file from local chunks and hashing it (the manifest carries no SHA-256). A refused copy is deleted and not fetched again. Held copies are re-judged every recheck_secs; a copy that becomes labelled is let go like a surplus copy.
    • policy_refusal is a new gossip variant on c0mpute/hosting/v1. A refusing peer is not a holder and not a candidate, so it is never challenged and gets no failed receipt.
    • The refused count runs end to end: GET /hosting/v1/sites (refused, refused_by), the refused: line from hosting publish, two new columns in the web push store, hosting_push_status / hosting_pushes, and c0mpute chat push hosting status. Peers are never named.
    • It reuses the gateway's [moderation] table and the same Gate. One new key, [moderation] refuse_replicas, default true.

    Not done

    • Striped sites (over 1 GiB) are not checked. A worker holds chunk groups there, not whole files, so it cannot hash them.
    • Accrued payout is not forfeited. A refuser stops being challenged and so stops earning, but passes earned earlier in the settlement window are still paid.

    Worth knowing

    • On upgrade, a node that already has [moderation] labelers and the hosting role starts refusing replicas. With no labelers, the default, nothing changes.
    • Nodes older than 0.3.113 skip the new message and still rank a refuser as a candidate, so on a mostly-old network a refused copy can take longer to be replaced.
    • Refusals are not persisted: after a restart a node fetches a labelled site once and refuses it again.
    • The count in hosting_push_status is a snapshot from when the site went live; /hosting/v1/sites has the current number.

    🤖 Generated with Claude Code

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions