feat(holdings): holdings are DECLARED, not inferred from transport
Until now every receive path recorded the SENDER in `file_holders`, and
those rows went straight back out on the wire to third parties as
`cdn_redirect_peers`, as worm holder answers, and as HTTP 302 targets.
Exchanging bytes with a peer enrolled its node id -- and its addresses --
into a list we republished to anyone who asked.
Two things follow, and both matter. The concealment model the erasure
work depends on ("hold k shards quietly, announce exactly one slot") is
impossible on an inferred foundation: acquiring a shard registers you as
its holder whether you consented or not. And an enumerator never had to
hold anything -- it just asked holders who else holds.
`file_holders` rows now split two ways:
* local hint (`declared = 0`) -- "we exchanged bytes about this file
with that peer". Drives fetch retry, diff-propagation targets and
manifest refresh. Never published as a holder of a specific file.
* declaration (`declared = 1`) -- the peer told us "I hold this and you
may advertise me for it" (0xD3). The only holder list that may leave
the node.
All 12 inference sites were triaged into hints with a per-site reason
rather than deleted. 0xD3 became the declaration handler and is validated
hard, since it is now the only unauthenticated input reaching an outbound
holder surface: 16 KB read ceiling (was MAX_PAYLOAD, 64 MB), reject rather
than truncate oversized batches, a `tracks_file` gate so a stranger cannot
mint rows for arbitrary 32-byte ids, a per-peer token bucket and row
budget, and normalised publicly-routable addresses capped at 4. An
introducer nominee must be a known anchor -- otherwise a peer could make
us publish an arbitrary victim's address.
Declarations are soft state: a rotating per-peer sweep rides each
content-sync cycle and `DECLARATION_TTL_MS` (30d) ages out a holder that
goes quiet, so a peer that wipes its database re-learns them.
Durability decisions count EVIDENCE, never claims. A new `witnessed`
column records transport events we handled ourselves, independent of
`declared` because a peer can be both; keying the count on `declared = 0`
instead dropped every honest custodian that declared out of its author's
durability count, making the post look less durable and provoking
replication it did not need. Gating replication on claims would also let
five Sybil identities declare a post and silently stop its author
replicating it -- the data-availability attack the erasure study rules
against.
Alpha policy defaults are deliberately generous (both classes declare,
per-author cap off) because a tight cap makes content unfindable and
there is no spare holder population yet. Own-authored content is never
declared by default: it publishes device <-> posting identity, the
binding the manifest address strip exists to prevent. Non-public content
is never declared at all, at a single chokepoint. Policy changes are
retroactive, so the open alpha shape is transitional.
Known limit, documented in `holdings.rs` and design.html: this hides
WHICH and HOW MANY of an author's posts you hold, not THAT you hold some
of that author's content -- `build_own_uniques` still announces every
distinct author, deliberately interest-blind-but-complete so discovery
works. The one-shard-announcement property holds at file granularity
only; closing the author-level surface is a discovery trade Round 10 has
not ruled on.
Wire format (clean break, zero users): drops
`BlobRequestPayload.requester_addresses`, `BlobResponsePayload`'s
`cdn_registered`, and `CdnManifest.host` -- the last rode every blob
response and was relayed verbatim, so a third party learned "node A holds
this CID" with no declaration from A. ALPN is NOT bumped here; see the PR.
301 core tests (was 267), a3 23/23 (12 pre-existing + 11 new behavioural
assertions), c_topology 33/33 unchanged. Policy knobs reachable from the
desktop app, not CLI-only.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LGiPD2cF75mnvneSCjdDC5
This commit is contained in:
parent
eebf0d86f0
commit
3430a9d4c9
17 changed files with 3560 additions and 157 deletions
|
|
@ -8,6 +8,7 @@ pub mod content;
|
|||
pub mod control;
|
||||
pub mod crypto;
|
||||
pub mod group_key_distribution;
|
||||
pub mod holdings;
|
||||
pub mod http;
|
||||
pub mod export;
|
||||
pub mod fof;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue