Skip to main content

29/WAKU2-CONFIG

29/WAKU2-CONFIG describes the RECOMMENDED values to assign to configurable parameters for Waku v2 clients. Since Waku v2 is built on libp2p, most of the parameters and reasonable defaults are derived from there.

Waku v2 relay messaging is specified in 11/WAKU2-RELAY, a minor extension of the libp2p GossipSub protocol. GossipSub behaviour is controlled by a series of adjustable parameters. Waku v2 clients SHOULD configure these parameters to the recommended values below.

GossipSub v1.0 parameters

GossipSub v1.0 parameters are defined in the corresponding libp2p specification. We repeat them here with RECOMMMENDED values for 11/WAKU2-RELAY implementations.

ParameterPurposeRECOMMENDED value
DThe desired outbound degree of the network6
D_lowLower bound for outbound degree4
D_highUpper bound for outbound degree8
D_lazy(Optional) the outbound degree for gossip emissionD
heartbeat_intervalTime between heartbeats1 second
fanout_ttlTime-to-live for each topic's fanout state60 seconds
mcache_lenNumber of history windows in message cache5
mcache_gossipNumber of history windows to use when emitting gossip3
seen_ttlExpiry time for cache of seen message ids2 minutes

GossipSub v1.1 parameters

GossipSub v1.1 extended GossipSub v1.0 and introduced several new parameters. We repeat the global parameters here with RECOMMMENDED values for 11/WAKU2-RELAY implementations.

ParameterDescriptionRECOMMENDED value
PruneBackoffTime after pruning a mesh peer before we consider grafting them again.1 minute
FloodPublishWhether to enable flood publishingtrue
GossipFactor% of peers to send gossip to, if we have more than D_lazy available0.25
D_scoreNumber of peers to retain by score when pruning from oversubscriptionD_low
D_outNumber of outbound connections to keep in the mesh.D_low - 1

11/WAKU2-RELAY clients SHOULD implement a peer scoring mechanism with the parameter constraints as specified by libp2p.

Other configuration

The following behavioural parameters are not specified by libp2p, but nevertheless describes constraints that 11/WAKU2-RELAY clients MAY choose to implement.

ParameterDescriptionRECOMMENDED value
BackoffSlackTimeSlack time to add to prune backoff before attempting to graft again2 seconds
IWantPeerBudgetMaximum number of IWANT messages to accept from a peer within a heartbeat25
IHavePeerBudgetMaximum number of IHAVE messages to accept from a peer within a heartbeat10
IHaveMaxLengthMaximum number of messages to include in an IHAVE message5000

Copyright and related rights waived via CC0.

References