After a restart, PodcastDht::maintenance republished every locally active
card as soon as its first bootstrap found peers, before the client could
reconcile with sync_shares, so a share revoked on another trusted device
while this one was offline was re-sent from the stale cache. Own cards are
now neither republished nor served to FindValue until the first
sync_shares of the process (or an explicit publish of that podcast);
tombstones are still sent. The first sync_shares re-sends unchanged cards.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replicas no longer hand capacity to whoever stored first: a key holds at
most one FindValue response worth of records (128, 32 tombstones), so
every admitted record is served, and a full key or cache admits a
newcomer by evicting a random record from its younger half. In-place
card-to-tombstone conversions count against the tombstone budget.
Contacts returned by peers are only lookup and bootstrap candidates
until they answer; replica responsibility counts verified contacts that
are not backed off, and contacts that keep failing are dropped. Refused
store batches fall back to the next closest nodes once. Each lookup
response may add at most 64 new owners.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replicas now accept records only from their publisher, keep one payload
per (podcast, publisher), store placements only for keys they are close
to, and admit records within per-key, per-tombstone, per-publisher and
total budgets without ever evicting existing records. Tombstones cannot
claim text keys without their owner's card. Search offers only the feed
URL the podcast id hashes from and reports moved-feed URLs as claims;
publisher counts no longer rank. sync_shares handles each podcast on its
own, always revokes, and holds back cards with privacy warnings. Lookups
and inbound requests per peer are bounded, persisted contacts are capped,
and the podcast_dht capability is opt-in.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A publishes, an unrelated peer C finds the card by text and id while A's
trusted device B is offline, a never-shared podcast stays invisible, a
tombstone hides the card, and forged, tampered, replayed, malformed,
oversized and wrong-version requests are rejected. A peer without the
overlay never joins its routing table.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>