Back to Site
Loading...
Searching...
No Matches
librats::PubSub::Config Struct Reference

GossipSub tuning. More...

#include <pubsub.h>

Public Attributes

int mesh_target = 6
 D — desired mesh degree per topic.
 
int mesh_low = 4
 D_low — graft more peers below this.
 
int mesh_high = 12
 D_high— prune peers above this.
 
int fanout_size = 6
 peers used to publish to a topic we are not subscribed to
 
int gossip_factor = 6
 D_lazy— peers we emit IHAVE to per heartbeat per topic.
 
std::chrono::milliseconds fanout_ttl {60000}
 drop a fanout set idle this long
 
std::chrono::milliseconds heartbeat_interval {1000}
 mesh maintenance + gossip cadence
 
int history_length = 5
 heartbeat windows the message cache keeps (for IWANT)
 
int history_gossip = 3
 of those, how many windows IHAVE advertises
 
size_t seen_limit = 8192
 dedup ids remembered
 

Detailed Description

GossipSub tuning.

Defaults mirror the libp2p reference (D=6, D_low=4, D_high=12) and are sensible for small-to-medium meshes.

Definition at line 65 of file pubsub.h.

Member Data Documentation

◆ fanout_size

int librats::PubSub::Config::fanout_size = 6

peers used to publish to a topic we are not subscribed to

Definition at line 69 of file pubsub.h.

◆ fanout_ttl

std::chrono::milliseconds librats::PubSub::Config::fanout_ttl {60000}

drop a fanout set idle this long

Definition at line 71 of file pubsub.h.

◆ gossip_factor

int librats::PubSub::Config::gossip_factor = 6

D_lazy— peers we emit IHAVE to per heartbeat per topic.

Definition at line 70 of file pubsub.h.

◆ heartbeat_interval

std::chrono::milliseconds librats::PubSub::Config::heartbeat_interval {1000}

mesh maintenance + gossip cadence

Definition at line 72 of file pubsub.h.

◆ history_gossip

int librats::PubSub::Config::history_gossip = 3

of those, how many windows IHAVE advertises

Definition at line 74 of file pubsub.h.

◆ history_length

int librats::PubSub::Config::history_length = 5

heartbeat windows the message cache keeps (for IWANT)

Definition at line 73 of file pubsub.h.

◆ mesh_high

int librats::PubSub::Config::mesh_high = 12

D_high— prune peers above this.

Definition at line 68 of file pubsub.h.

◆ mesh_low

int librats::PubSub::Config::mesh_low = 4

D_low — graft more peers below this.

Definition at line 67 of file pubsub.h.

◆ mesh_target

int librats::PubSub::Config::mesh_target = 6

D — desired mesh degree per topic.

Definition at line 66 of file pubsub.h.

◆ seen_limit

size_t librats::PubSub::Config::seen_limit = 8192

dedup ids remembered

Definition at line 75 of file pubsub.h.


The documentation for this struct was generated from the following file: