From c4b33b9b4aff6129291021448ae21298049093ae Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 9 Nov 2026 15:30:50 +0000 Subject: roots: only the seeds' roots end the wait for them Review 4, R2 partly (F8): a joining node waited for "each of its seeds" to name the swarm's root as a count, of every admitted peer that named one. Node identities are self-made and admission is the swarm key: a member answering a joiner under as many identities as it has seeds, naming its own root within the wait, made the joiner pin it before the real seeds answered, and refuse them after as another history. Now the seeds are the nodes proven at the seeds' addresses (`roots::seed_found`, as `bootstrap::resolve_seeds` finds them), and only their roots count toward the wait and start its clock. Another peer naming a root still disputes it (no root while they differ), so such a member can keep a joiner from joining, as any member can, but not hand it another root. access.md says so. --- src/swarm/bootstrap.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/swarm/bootstrap.rs') diff --git a/src/swarm/bootstrap.rs b/src/swarm/bootstrap.rs index 6d3a4ad..d2a593b 100644 --- a/src/swarm/bootstrap.rs +++ b/src/swarm/bootstrap.rs @@ -409,6 +409,7 @@ async fn resolve_seeds( debug!(seed = %seed, peer = %peer, "Resolved seed"); } remember_peer(state, &peer).await; + crate::swarm::roots::seed_found(state, &peer); if let Err(error) = send_hello_once(state, &peer).await { warn!(peer = %peer, error = %format!("{error:#}"), "Initial HELLO failed; will retry"); } -- cgit v1.3.1