Expand description
Gossip Dissemination Protocol Engine
A production-quality gossip protocol engine implementing epidemic broadcast with
pluggable fanout strategies, message deduplication, hop-count TTL, and per-peer
delivery scoring. All state is synchronous and Send + Sync-compatible (the
public API takes &mut self for mutable operations).
§Design notes
- No external PRNG:
xorshift64is used where randomness is required. - No
randcrate: coin-flip / shuffle are done inline. - FNV-1a 64-bit is used for deterministic message-ID generation.
- Dedup cache: bounded
VecDequeproviding O(1) push / O(n) lookup, sufficient for typical gossip workloads where the window is small (≤ 4096 messages).
Structs§
- Gossip
Config - Configuration for a
GossipProtocolEngine. - Gossip
Message - A gossip message travelling through the overlay.
- Gossip
Peer - An active or recently-seen gossip peer.
- Gossip
Protocol Engine - Production-quality gossip dissemination protocol engine.
- Gossip
Stats - Aggregate statistics produced by a
GossipProtocolEngine.
Enums§
- Engine
Error - Errors returned by
GossipProtocolEngineoperations. - Fanout
Strategy - Peer-selection strategy used when forwarding messages.
- Gossip
Event - Events emitted by a
GossipProtocolEngine.
Functions§
- fnv1a_
64 - FNV-1a 64-bit hash.
- xorshift64
- Xorshift64 PRNG – mutates
statein-place and returns the next value.