From c534b25dbd94dc41731f98e4c4b2a170fe02c347 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 16 Nov 2026 20:44:13 +0000 Subject: handshake: the party its sender is of In a swarm holding a store, a node's handshakes name the party it is of (`docs/store.md`, Members), so that a peer tells whether it is a member before its entry reaches it: HELLO and HELLO_REPLY carry `party`, as `--store-party` says, None elsewhere and without the `federation` feature. Wire format version 52. --- src/transport/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/transport/mod.rs') diff --git a/src/transport/mod.rs b/src/transport/mod.rs index e366f72..ad45ce9 100644 --- a/src/transport/mod.rs +++ b/src/transport/mod.rs @@ -566,6 +566,9 @@ pub(crate) struct HelloRequest { /// a joining node takes as the root, where those it hears agree. #[serde(with = "serde_bytes")] pub(crate) root: Option>, + /// The party the sender is of, in a swarm holding a store (`--store-party`): nodes of + /// one sync with the nodes its parties list, each as its party's. None elsewhere. + pub(crate) party: Option, } /// A peer a HELLO_REPLY lists: who it is, and where the sender reaches it. @@ -654,6 +657,8 @@ pub(crate) struct HelloReply { /// As `HelloRequest::root`. #[serde(with = "serde_bytes")] pub(crate) root: Option>, + /// As `HelloRequest::party`. + pub(crate) party: Option, } /// Bytes shown as lowercase hex, e.g. run IDs in logs. @@ -688,6 +693,7 @@ impl std::fmt::Debug for HelloRequest { .field("run_id", &Hex(&self.run_id)) .field("handshake", &self.handshake) .field("root", &self.root.as_deref().map(Hex)) + .field("party", &self.party) .finish() } } @@ -705,6 +711,7 @@ impl std::fmt::Debug for HelloReply { .field("away_ms", &self.away_ms) .field("sender_run_id", &Hex(&self.sender_run_id)) .field("root", &self.root.as_deref().map(Hex)) + .field("party", &self.party) .finish() } } -- cgit v1.3.1