p2p: anti-entropy, a periodic sync with one random peer

Repairs what gossip lost while two nodes stay connected; cheap because
matching digests end the round at once.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
This commit is contained in:
2026-11-18 17:33:06 +01:00
co-authored by Claude Sonnet 5.5
parent 11fd2a88c0
commit a54094ea35
3 changed files with 71 additions and 7 deletions
+4 -2
View File
@@ -142,7 +142,9 @@ within 30 days.
existed) is caught up the original way: kinds `revocations`, `listings` and
`messages`, paged by `(created_at, author, id)` and `(created_at, hash)`
cursors, which servers still answer. Gossip lost *while connected* is only
repaired by the next reconnect; periodic anti-entropy is future work.
repaired by the next reconnect, and by anti-entropy: every 30 minutes a node
runs this sync again with one random connected peer that shares a region (a
matching digest makes a round nearly free).
- **Reconnection**: bootstrap peers are redialed every 20 s when disconnected.
- **Re-announce**: a running node re-gossips its own live listings and
revocations every 30 minutes, so newcomers hear about them without waiting
@@ -493,7 +495,7 @@ Proof-of-work per listing and per revocation, plus subscribable blocklists
Abuse reporting for messages, reciprocity rules, anti-
discrimination (AGG) content rules, blocklists, peer scoring and rate limits,
periodic anti-entropy while connected, a fallback bootstrap list inside the binary
a fallback bootstrap list inside the binary
for networks that block DNS, image hosting,
recovering listings onto a fresh machine with an empty database, a helper to
turn a place name into a region.