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/simtest/bench.rs | 9 +++------ src/simtest/signatures.rs | 12 ++++++------ 2 files changed, 9 insertions(+), 12 deletions(-) (limited to 'src/simtest') diff --git a/src/simtest/bench.rs b/src/simtest/bench.rs index 585ea1e..04b2eb6 100644 --- a/src/simtest/bench.rs +++ b/src/simtest/bench.rs @@ -491,7 +491,7 @@ impl Totals { } /// The kinds, in the order of the report. -const KINDS: [&str; 12] = [ +const KINDS: [&str; 11] = [ "SYNC", "STATUS", "STATUS_REPLY", @@ -503,10 +503,9 @@ const KINDS: [&str; 12] = [ "PROBE", "PRUNE/GRAFT", "NEIGHBOUR", - "SIGNATURES", ]; -fn counters(by: &ByKind) -> [Counter; 12] { +fn counters(by: &ByKind) -> [Counter; 11] { [ by.sync, by.status, @@ -519,11 +518,10 @@ fn counters(by: &ByKind) -> [Counter; 12] { by.probe, by.plumtree, by.hyparview, - by.signatures, ] } -fn counters_mut(by: &mut ByKind) -> [&mut Counter; 12] { +fn counters_mut(by: &mut ByKind) -> [&mut Counter; 11] { [ &mut by.sync, &mut by.status, @@ -536,7 +534,6 @@ fn counters_mut(by: &mut ByKind) -> [&mut Counter; 12] { &mut by.probe, &mut by.plumtree, &mut by.hyparview, - &mut by.signatures, ] } diff --git a/src/simtest/signatures.rs b/src/simtest/signatures.rs index c6232e7..b65b3a7 100644 --- a/src/simtest/signatures.rs +++ b/src/simtest/signatures.rs @@ -1,7 +1,7 @@ -//! Signed changes end to end (`document::signatures`, `swarm::signatures`): nodes under -//! the identity layer, whose node keys sign, write through the API as a user would, -//! and every node comes to see the writes verified, by signatures that came with sync -//! messages or on their own. +//! Signed changes end to end (`document::signatures`): nodes under the identity layer, +//! whose node keys sign, write through the API as a user would, and every node comes +//! to see the writes verified, by signatures that came with the changes in sync +//! messages. use std::time::Duration; @@ -80,8 +80,8 @@ async fn a_signed_write_vouches_for_the_writes_before() { let (actor, first) = write_as_user(&b, "metrics/cpu", json!(42), false).await; sim.wait_converged(&[&a, &b, &c], SOON).await; - // Signatures go within a second: none came for it. Unless b wrote protocol data - // since (always signed), whose signature vouches for it too. + // None is made for it, nor sent. Unless b wrote protocol data since (always + // signed), whose signature vouches for it too. tokio::time::sleep(Duration::from_secs(3)).await; let latest = b .doc -- cgit v1.3.1