diff options
| author | tv <tv@krebsco.de> | 2026-11-08 22:47:10 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-09 00:14:20 +0100 |
| commit | e7d02e2d71cd4c339b386a751f32050d33f86b89 (patch) | |
| tree | 350a7a7eec479c76768a7fa4d5797b184571fb4d /src/transport/mod.rs | |
| parent | eae437ce2734b8d65bf40aa207c134a3c641138f (diff) | |
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.
Diffstat (limited to 'src/transport/mod.rs')
| -rw-r--r-- | src/transport/mod.rs | 16 |
1 files changed, 0 insertions, 16 deletions
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<crate::document::ChangeHash>, } -/// 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(_) |
