Skip to content

v0.1.95

Choose a tag to compare

@ch4r10t33r ch4r10t33r released this 17 Jun 15:20
· 31 commits to main since this release
bcb2f40

gossipsub: FANOUT + FANOUT_TTL (#200)

Adds gossipsub v1.1 FANOUT so a node can publish to topics it is not subscribed to (e.g. a validator publishing to an attestation subnet it doesn't follow).

  • New per-topic fanout peer set keyed by topic; on a fanout publish, up to mesh_n connected peers are selected (direct-peer / score / backoff aware) and reused until they disconnect or the entry expires.
  • fanout_ttl_ms config (libp2p FANOUT_TTL, default 60 s); heartbeat prunes stale fanout entries.
  • subscribe() promotes existing fanout peers straight into the topic mesh.
  • Subscribed-topic local publishes now forward directed to mesh peers (spec-aligned with inbound forwarding) instead of broadcasting to all connected peers.
  • Owns its topic keys (consistent with the subs/mesh key-ownership model from v0.1.94's interop SIGSEGV fix).
  • 4 new unit tests (target selection, reuse-before-TTL, TTL prune, subscribe promotion).

Closes #200. Full cross-impl interop matrix (zig × go-libp2p × rust-libp2p) green.

Note for embedders: publishing on a subscribed topic is now mesh-directed rather than broadcast — confirm your mesh forms before relying on propagation.