From 391481abb21d2a84a286157e3334d737b155d155 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 6 Nov 2026 21:32:22 +0100 Subject: HyParView flood default --- src/config/mod.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/config') diff --git a/src/config/mod.rs b/src/config/mod.rs index 25b1c73..db700ef 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -289,14 +289,14 @@ pub(crate) const OPTIONS: &[OptionSpec] = &[ Kind::Text, "ring-and-pairs|hyparview", Some("ring-and-pairs"), - "How a node's neighbours are chosen: by the graph every node computes alike from the member list, or by HyParView (an active view of neighbours each agreed to, the others asked from the member list as neighbours fail). A genesis node records its own in the document; every node follows what the swarm records, which a protocol writer may change (_continuum/topology), and uses its own only where the swarm records none it knows. With hyparview, what needs the shared graph does nothing (writers' trees: use plumtree).", + "How a node's neighbours are chosen: by the graph every node computes alike from the member list, or by HyParView (an active view of neighbours each agreed to, the others asked from the member list as neighbours fail). A genesis node records its own in the document; every node follows what the swarm records, which a protocol writer may change (_continuum/topology), and uses its own only where the swarm records none it knows. With hyparview, what needs the shared graph does nothing (writers' trees: use flood).", ), option( "dissemination", Kind::Text, "writers-trees|plumtree|flood", Some("writers-trees"), - "How a change reaches every member: along writers' trees computed alike on every node from the member list, by PlumTree (eager links pruned where they deliver twice, grafted where announcements had to bring a change), or by flooding (every change pushed to every neighbour: the baseline). A genesis node records its own in the document; every node follows what the swarm records, which a protocol writer may change (_continuum/dissemination), and uses its own only where the swarm records none it knows. Default: plumtree with topology hyparview, else writers-trees (docs/topology.md).", + "How a change reaches every member: along writers' trees computed alike on every node from the member list, by PlumTree (eager links pruned where they deliver twice, grafted where announcements had to bring a change), or by flooding (every change pushed to every neighbour: the baseline). A genesis node records its own in the document; every node follows what the swarm records, which a protocol writer may change (_continuum/dissemination), and uses its own only where the swarm records none it knows. Default: flood with topology hyparview, else writers-trees (docs/topology.md).", ), option( "superseded-writes", @@ -1552,15 +1552,17 @@ pub(crate) fn load() -> Result { const HYPARVIEW_NEIGHBOURS: usize = 5; /// Defaults that depend on other options, for those not `set`: with `topology -/// hyparview`, `dissemination plumtree` (writers' trees need the graph every node shares, -/// which HyParView has none of) and `neighbours` `HYPARVIEW_NEIGHBOURS`. +/// hyparview`, `dissemination flood` (writers' trees need the graph every node shares, +/// which HyParView has none of; flooding its 5 neighbours was faster than PlumTree over +/// them, at about as many messages: `docs/topology.md`) and `neighbours` +/// `HYPARVIEW_NEIGHBOURS`. fn derive_defaults(settings: &mut Settings, set: &dyn Fn(&str) -> bool) { use crate::swarm::dissemination::Kind as Dissemination; use crate::swarm::topology::Kind as Topology; if settings.topology == Topology::Hyparview { if !set("dissemination") { - settings.dissemination = Dissemination::Plumtree; - info!("topology hyparview: dissemination plumtree, as none is set"); + settings.dissemination = Dissemination::Flood; + info!("topology hyparview: dissemination flood, as none is set"); } if !set("neighbours") { settings.neighbours = HYPARVIEW_NEIGHBOURS; @@ -1579,7 +1581,7 @@ fn warn_combinations(settings: &Settings, set: &dyn Fn(&str) -> bool) { use crate::swarm::topology::Kind as Topology; match (settings.topology, settings.dissemination) { (Topology::Hyparview, Dissemination::WritersTrees) => warn!( - "topology hyparview with dissemination writers-trees: writers' trees need the graph every node shares, which HyParView has none of, so changes pass on by announcements alone, a round and a pull per hop; dissemination plumtree is what goes with it" + "topology hyparview with dissemination writers-trees: writers' trees need the graph every node shares, which HyParView has none of, so changes pass on by announcements alone, a round and a pull per hop; dissemination flood is what goes with it" ), (_, Dissemination::Flood) if settings.neighbours > HYPARVIEW_NEIGHBOURS => warn!( neighbours = settings.neighbours, -- cgit v1.3.1