diff options
| author | tv <tv@krebsco.de> | 2026-11-13 17:06:37 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-13 17:06:37 +0000 |
| commit | f6a5c50e0f24736e48c96e9f7a0d14e9d7474b2d (patch) | |
| tree | 4f8c454ac4293fc2ca29092cc19f7753c7e5887f /src/transport/mod.rs | |
| parent | 96b4ae2984e7b0b1d9970acbb20b9165b1e3f2f0 (diff) | |
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.
Diffstat (limited to 'src/transport/mod.rs')
| -rw-r--r-- | src/transport/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/transport/mod.rs b/src/transport/mod.rs index 2778ed7..e366f72 100644 --- a/src/transport/mod.rs +++ b/src/transport/mod.rs @@ -488,7 +488,8 @@ pub(crate) struct TreeLink { /// NEIGHBOUR: the sender asks the recipient to be neighbours (`swarm::hyparview`), as /// HyParView's NEIGHBOR; `high` when the sender has none (then the recipient makes room -/// if it must). +/// if it must), `one_short` when it has one less than `k` (then a recipient with `k` +/// takes it as its `k + 1`th). #[derive(Debug, Clone, Serialize, Deserialize)] pub(crate) struct NeighbourRequest { #[serde(with = "crate::transport::wire::codec::epoch")] @@ -496,6 +497,7 @@ pub(crate) struct NeighbourRequest { /// See `SyncEnvelope::epoch_seq`. pub(crate) epoch_seq: u32, pub(crate) high: bool, + pub(crate) one_short: bool, } /// NEIGHBOUR_REPLY (whether the recipient of a NEIGHBOUR agreed) and DISCONNECT (never |
