From 2a85e21ab81d4497dcc5680b4348bbf802866944 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 3 Nov 2026 08:34:09 +0100 Subject: unanswered members not reached --- docs/peers.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'docs/peers.md') diff --git a/docs/peers.md b/docs/peers.md index 127b2ad..c2f1ddb 100644 --- a/docs/peers.md +++ b/docs/peers.md @@ -298,10 +298,14 @@ NAT may reach a single one, one on libp2p alone none on Tor alone), and no node which from where it is. A neighbour that has the changes already only answers. Every node tells its neighbours whom it reaches ([`swarm/reach.rs`](../src/swarm/reach.rs)): the members it -has an active session with (handshake done, neither dormant nor unreachable), each by -an 8-byte key (the hash its pair scores come from), in its keepalive STATUSes and -their replies, and within 5 s when it changed; not in announcements of heads, which go -often. So every node knows its 2-hop neighbourhood as measured, not as the member list +has an active session with (handshake done, neither dormant nor unreachable) that +answer, each by an 8-byte key (the hash its pair scores come from), in its keepalive +STATUSes and their replies, and within 5 s when it changed; not in announcements of +heads, which go often. A member that leaves a keepalive or sync message unanswered, +with nothing else heard from it, is asked again (a PING) after the first sync reply +timeout, and after twice that no longer counts as reached: its neighbours are told at +once, and the members whose parent it was in a writer's tree take another, within +seconds rather than after `dormant_after`. Any message from it, and it counts again. So every node knows its 2-hop neighbourhood as measured, not as the member list says, for as long as each neighbour's session lasts (one that goes dormant or starts anew says it again), and nothing goes into the document. Not for a set time: while a pair exchanges changes it sends no keepalives, and so no STATUS, however long the @@ -403,5 +407,6 @@ Derived from `--keepalive` (`Timing::from_keepalive`, [`state/timing.rs`](../src | `dormant_probe` | 10 × keepalive | the first probe of an unreachable peer, doubling up to 6 × (or `--dormant-probe-max`) | | `catch_up_probe` | keepalive / 30, from 1 to 5 s | how soon a silent catch-up source is probed | | sync reply timeout | 10 s (30 s with Tor enabled: the longest of the transports'), doubling up to 30 × | resending a sync message nothing answered | +| `unreached_after` | 2 × the first sync reply timeout | a keepalive or sync message unanswered this long (asked again halfway), a peer no longer counts as reached | -The peer worker runs when the earliest of these is due for some peer (and when something may have made one due sooner: a HELLO sent, a sync message sent, a keepalive received, a new peer or new neighbours), at least every 5 s; the remake worker every second. +The peer worker runs when the earliest of these is due for some peer (and when something may have made one due sooner: a HELLO sent, a sync message sent, a keepalive received, a new peer or new neighbours), at least every 5 s, and tells the neighbours whom it reaches at once when a member it reached stops answering; the remake worker every second. -- cgit v1.3.1