From 5cd26d321b706113afb8431aba35ab8fb32281c4 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 3 Nov 2026 02:43:15 +0100 Subject: announcements answered only if heads differ --- docs/architecture.md | 2 +- docs/peers.md | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/architecture.md b/docs/architecture.md index cc738c1..1a320fc 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -232,7 +232,7 @@ the member list makes its neighbour. replies, admit (swarm key), mark the peer seen, record its epoch (ignoring late ones), then by type: HELLO answered, HELLO_REPLY establishes membership and discovers peers, sync queued on its lane if on our epoch (held back from everyone but the source while catching -up), STATUS answered with a STATUS_REPLY and compared for divergence, blobs served or collected, +up), STATUS answered with a STATUS_REPLY (an announcement only if the heads differ) and compared for divergence, blobs served or collected, LINKS answered with the node's links if the asker is a member, and again on each change while it subscribes, or with other members' links it asks for the asker, which can't reach them (`swarm::links`, for the dashboard); PING and PONG (the paths layer answered the PING already) only mark the peer seen, and after a PONG the peer's round-trip time is its path's again. diff --git a/docs/peers.md b/docs/peers.md index 9937c63..9868c0e 100644 --- a/docs/peers.md +++ b/docs/peers.md @@ -280,8 +280,9 @@ backbone (with 20 stable of 250 members and k = 12: about 65 links per stable me Changes travel through a partial mesh by announcement and pull ([`swarm/relay.rs`](../src/swarm/relay.rs)): a node pushes its own writes to its neighbours; after applying changes from one neighbour it -sends its other neighbours a STATUS with its new heads, and a neighbour that lacks those -heads pulls them (it sets them as the peer's heads in its sync state, so Automerge asks +sends its other neighbours a STATUS with its new heads (marked as an announcement: no +keepalive, and answered only by a neighbour whose heads differ, so one that has the +changes already sends nothing back), and a neighbour that lacks those heads pulls them (it sets them as the peer's heads in its sync state, so Automerge asks for what's missing). It pulls from one neighbour at a time (15 s timeout); neighbours that announce heads it lacks meanwhile wait their turn and are pulled from as soon as the current pull is answered, if they still have something it lacks. The regular -- cgit v1.3.1