From 8f0b588831ac06913dd01a3ebd8bb523292d992e Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 3 Nov 2026 02:43:43 +0100 Subject: skip neighbours with our heads --- docs/peers.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'docs/peers.md') diff --git a/docs/peers.md b/docs/peers.md index 9868c0e..a56ee62 100644 --- a/docs/peers.md +++ b/docs/peers.md @@ -282,7 +282,10 @@ Changes travel through a partial mesh by announcement and pull ([`swarm/relay.rs pushes its own writes to its neighbours; after applying changes from one neighbour it 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 +changes already sends nothing back; nor is a neighbour told whose latest heads, as its +own announcement or STATUS brought them, are this node's: announcements wait 200 to +400 ms, at random, so of two neighbours with the same news one is usually first, and +the other skips it), 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