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.">
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." />
<p>GossipSub v1.0 parameters are defined in the <ahref="https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/gossipsub-v1.0.md#parameters">corresponding libp2p specification</a>.
We repeat them here with RECOMMMENDED values for <code>11/WAKU2-RELAY</code> implementations.</p>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Purpose</th>
<th>RECOMMENDED value</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>D</code></td>
<td>The desired outbound degree of the network</td>
<td>6</td>
</tr>
<tr>
<td><code>D_low</code></td>
<td>Lower bound for outbound degree</td>
<td>4</td>
</tr>
<tr>
<td><code>D_high</code></td>
<td>Upper bound for outbound degree</td>
<td>12</td>
</tr>
<tr>
<td><code>D_lazy</code></td>
<td>(Optional) the outbound degree for gossip emission</td>
<td><code>D</code></td>
</tr>
<tr>
<td><code>heartbeat_interval</code></td>
<td>Time between heartbeats</td>
<td>1 second</td>
</tr>
<tr>
<td><code>fanout_ttl</code></td>
<td>Time-to-live for each topic’s fanout state</td>
<td>60 seconds</td>
</tr>
<tr>
<td><code>mcache_len</code></td>
<td>Number of history windows in message cache</td>
<td>5</td>
</tr>
<tr>
<td><code>mcache_gossip</code></td>
<td>Number of history windows to use when emitting gossip</td>
<td>3</td>
</tr>
<tr>
<td><code>seen_ttl</code></td>
<td>Expiry time for cache of seen message ids</td>
<p>GossipSub v1.1 extended GossipSub v1.0 and introduced <ahref="https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/gossipsub-v1.1.md#overview-of-new-parameters">several new parameters</a>.
We repeat the global parameters here with RECOMMMENDED values for <code>11/WAKU2-RELAY</code> implementations.</p>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>RECOMMENDED value</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>PruneBackoff</code></td>
<td>Time after pruning a mesh peer before we consider grafting them again.</td>
<td>1 minute</td>
</tr>
<tr>
<td><code>FloodPublish</code></td>
<td>Whether to enable flood publishing</td>
<td>true</td>
</tr>
<tr>
<td><code>GossipFactor</code></td>
<td>% of peers to send gossip to, if we have more than <code>D_lazy</code> available</td>
<td>0.25</td>
</tr>
<tr>
<td><code>D_score</code></td>
<td>Number of peers to retain by score when pruning from oversubscription</td>
<td><code>D_low</code></td>
</tr>
<tr>
<td><code>D_out</code></td>
<td>Number of outbound connections to keep in the mesh.</td>
<td><code>D_low</code> - 1</td>
</tr>
</tbody>
</table>
<p><code>11/WAKU2-RELAY</code> clients SHOULD implement a peer scoring mechanism with the parameter constraints as <ahref="https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/gossipsub-v1.1.md#overview-of-new-parameters">specified by libp2p</a>.</p>
<h1id="other-configuration">
Other configuration
<aclass="anchor"href="#other-configuration">#</a>
</h1>
<p>The following behavioural parameters are not specified by <code>libp2p</code>,
but nevertheless describes constraints that <code>11/WAKU2-RELAY</code> clients MAY choose to implement.</p>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>RECOMMENDED value</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>BackoffSlackTime</code></td>
<td>Slack time to add to prune backoff before attempting to graft again</td>
<td>2 seconds</td>
</tr>
<tr>
<td><code>IWantPeerBudget</code></td>
<td>Maximum number of IWANT messages to accept from a peer within a heartbeat</td>
<td>25</td>
</tr>
<tr>
<td><code>IHavePeerBudget</code></td>
<td>Maximum number of IHAVE messages to accept from a peer within a heartbeat</td>
<td>10</td>
</tr>
<tr>
<td><code>IHaveMaxLength</code></td>
<td>Maximum number of messages to include in an IHAVE message</td>