From f6a5c50e0f24736e48c96e9f7a0d14e9d7474b2d Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 13 Nov 2026 17:06:37 +0000 Subject: hyparview: a member with k takes one a neighbour short A member one neighbour short asks once per `ONE_SHORT_EVERY` (300 s), and a member with `k` refused it. When a member most others had as a neighbour went away, three members ended up each with the other two as neighbours, one short each; each asked once, was refused by a full member, and waited five minutes. Changes pass only between neighbours: the three got none of what was written meanwhile (`active_views_settle_and_heal`, timed out waiting for the same heads). NEIGHBOUR says now whether its sender is one short, and a member with `k` takes such an ask as its `k + 1`th, the most it keeps; one with `k + 1` still refuses. Asks stay as rare as they were, and one is enough but where those asked have `k + 1`. Wire version 50. --- src/transport/wire.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/transport/wire.rs') diff --git a/src/transport/wire.rs b/src/transport/wire.rs index 3b67a74..c0db2e2 100644 --- a/src/transport/wire.rs +++ b/src/transport/wire.rs @@ -14,7 +14,7 @@ use super::{EncodedMessage, MessageKind, ParsedMessage}; /// The wire format's version, the first byte of every payload. Bump it with every change /// to a message type or a codec (`golden_bytes` fails then). -pub(crate) const VERSION: u8 = 49; +pub(crate) const VERSION: u8 = 50; /// What the second byte of a payload says. fn tag(kind: MessageKind) -> u8 { @@ -534,6 +534,7 @@ pub(crate) fn samples() -> Vec { epoch, epoch_seq: 1, high: true, + one_short: false, }), ParsedMessage::NeighbourReply(crate::transport::NeighbourAnswer { epoch, -- cgit v1.3.1