From e7d02e2d71cd4c339b386a751f32050d33f86b89 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 8 Nov 2026 22:47:10 +0000 Subject: swarm: no SIGNATURES Signatures sent on their own (SIGNATURES, every second, to each peer not sent them yet) flooded every link: a signature made after its change left, or one that came with changes, went to every neighbour, whether or not it got the change along with its signature elsewhere. With every change of a node signed as it leaves (1217) and signatures going where their changes go (1218), none is left for them to carry: the message, its task and its traffic counter go (wire version 46). Signatures waiting for their changes are offered as before when sync messages bring them, and the changes waiting for signatures judged again with the next batch. --- src/transport/mod.rs | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/transport/mod.rs') diff --git a/src/transport/mod.rs b/src/transport/mod.rs index 640754a..d794271 100644 --- a/src/transport/mod.rs +++ b/src/transport/mod.rs @@ -252,8 +252,6 @@ pub(crate) enum ParsedMessage { NeighbourReply(NeighbourAnswer), /// Tells the recipient we are neighbours no more (`swarm::hyparview`). Disconnect(NeighbourAnswer), - /// Signatures of changes, sent on their own (`swarm::signatures`). - Signatures(SignaturesMessage), /// Changes the sender refused, of those the recipient brought (`swarm::refusals`). Refusals(RefusalsMessage), } @@ -273,17 +271,6 @@ pub(crate) struct RefusalsMessage { pub(crate) changes: Vec, } -/// SIGNATURES: signatures of changes no sync message took (`swarm::signatures`). -#[derive(Debug, Clone, Serialize, Deserialize)] -pub(crate) struct SignaturesMessage { - #[serde(with = "crate::transport::wire::codec::epoch")] - pub(crate) epoch: Epoch, - /// See `SyncEnvelope::epoch_seq`. - pub(crate) epoch_seq: u32, - /// As `SyncEnvelope::signatures`. - pub(crate) signatures: serde_bytes::ByteBuf, -} - /// A node's proof that it holds the key of its node ID (`identity`), sending from its /// transport address to the recipient's: a signature over both addresses /// (`transport::identity::signed`). WHO and ME end at the identity layer; the rest of @@ -429,7 +416,6 @@ pub(crate) enum MessageKind { Neighbour, NeighbourReply, Disconnect, - Signatures, Refusals, } @@ -453,7 +439,6 @@ impl ParsedMessage { ParsedMessage::Neighbour(_) => MessageKind::Neighbour, ParsedMessage::NeighbourReply(_) => MessageKind::NeighbourReply, ParsedMessage::Disconnect(_) => MessageKind::Disconnect, - ParsedMessage::Signatures(_) => MessageKind::Signatures, ParsedMessage::Refusals(_) => MessageKind::Refusals, } } @@ -480,7 +465,6 @@ impl ParsedMessage { ParsedMessage::NeighbourReply(answer) | ParsedMessage::Disconnect(answer) => { Some((answer.epoch, answer.epoch_seq)) } - ParsedMessage::Signatures(message) => Some((message.epoch, message.epoch_seq)), ParsedMessage::Refusals(message) => Some((message.epoch, message.epoch_seq)), ParsedMessage::Who(_) | ParsedMessage::Me(_) -- cgit v1.3.1