From a02ed87abf6a0dc9d3f36bafcf333272586093aa Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 5 Nov 2026 03:50:38 +0100 Subject: epoch tag in sync --- docs/peers.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/peers.md b/docs/peers.md index e86e530..7213e70 100644 --- a/docs/peers.md +++ b/docs/peers.md @@ -104,7 +104,10 @@ epoch, and lost or stale sync state is repaired by the reply timeout, the `need` the heal. Keepalives only inform. Every message carries the sender's epoch, and with it how many times the sender changed -epoch in its current run. A node records a peer's epoch only from a message whose count +epoch in its current run. Sync messages, which go often and only between peers on one +epoch, carry a tag of it instead: its generation and the first 8 bytes of its ID. The +receiver takes it for its own epoch, or the sender's as it last knew it, whichever it +names; one that names neither is dropped. A node records a peer's epoch only from a message whose count is at least the newest it has seen from that peer, so a message delayed from before the peer switched (or rejoined, or gave up a rejoin) can't flip its recorded epoch back. The count starts over when the peer restarts, which its HELLO or HELLO_REPLY -- cgit v1.3.1