rfc/spec/29/index.html

456 lines
13 KiB
HTML

<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta name="generator" content="Hugo 0.106.0">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="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.">
<meta name="theme-color" content="#FFFFFF"><meta property="og:title" content="29/WAKU2-CONFIG" />
<meta property="og:description" content="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." />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://rfc.vac.dev/spec/29/" /><meta property="article:section" content="docs" />
<title>29/WAKU2-CONFIG | Vac RFC</title>
<link rel="manifest" href="/manifest.json">
<link rel="icon" href="/favicon.png" type="image/x-icon">
<link rel="stylesheet" href="/book.min.e935e20bd0d469378cb482f0958edf258c731a4f895dccd55799c6fbc8043f23.css" integrity="sha256-6TXiC9DUaTeMtILwlY7fJYxzGk&#43;JXczVV5nG&#43;8gEPyM=">
<script defer src="/en.search.min.07668e91447d4b5e23bc427fda23768cc7456c7564bfc4b25421bc181027a261.js" integrity="sha256-B2aOkUR9S14jvEJ/2iN2jMdFbHVkv8SyVCG8GBAnomE="></script>
<!--
Made with Book Theme
https://github.com/alex-shpak/hugo-book
-->
</head>
<body dir="ltr">
<input type="checkbox" class="hidden toggle" id="menu-control" />
<input type="checkbox" class="hidden toggle" id="toc-control" />
<main class="container flex">
<aside class="book-menu">
<div class="book-menu-content">
<nav>
<h2 class="book-brand">
<a href="/"><span>Vac RFC</span>
</a>
</h2>
<div class="book-search">
<input type="text" id="book-search-input" placeholder="Search" aria-label="Search" maxlength="64" data-hotkeys="s/" />
<div class="book-search-spinner hidden"></div>
<ul id="book-search-results"></ul>
</div>
<ul>
<li>Raw
<ul>
<li><a href="/spec/20/">20/TOY-ETH-PM</a></li>
<li><a href="/spec/24/">24/STATUS-CURATION</a></li>
<li><a href="/spec/28/">28/STATUS-FEATURING</a></li>
<li><a href="/spec/31/">31/WAKU2-ENR</a></li>
<li><a href="/spec/32/">32/RLN-V1</a></li>
<li><a href="/spec/34/">34/WAKU2-PEER-EXCHANGE</a></li>
<li><a href="/spec/35/">35/WAKU2-NOISE</a></li>
<li><a href="/spec/37/">37/WAKU2-NOISE-SESSIONS</a></li>
<li><a href="/spec/38/">38/CONSENSUS-CLARO</a></li>
<li><a href="/spec/43/">43/WAKU2-NOISE-PAIRING</a></li>
<li><a href="/spec/44/">44/WAKU2-DANDELION</a></li>
<li><a href="/spec/45/">45/WAKU2-ADVERSARIAL-MODELS</a></li>
<li><a href="/spec/46/">46/GOSSIPSUB-TOR-PUSH</a></li>
<li><a href="/spec/47/">47/WAKU2-TOR-PUSH</a></li>
<li><a href="/spec/48/">48/RLN-INTEREP-SPEC</a></li>
<li><a href="/spec/51/">51/WAKU2-RELAY-SHARDING</a></li>
<li><a href="/spec/52/">52/WAKU2-RELAY-STATIC-SHARD-ALLOC</a></li>
<li><a href="/spec/57/">57/STATUS-Simple-Scaling</a></li>
<li><a href="/spec/58/">58/RLN-V2</a></li>
<li><a href="/spec/61/">61/STATUS-Community-History-Archives</a></li>
<li><a href="/spec/63/">63/STATUS-Keycard-Usage</a></li>
<li><a href="/spec/64/">64/WAKU2-NETWORK</a></li>
</ul>
</li>
<li>Draft
<ul>
<li><a href="/spec/1/">1/COSS</a></li>
<li><a href="/spec/3/">3/REMOTE-LOG</a></li>
<li><a href="/spec/4/">4/MVDS-META</a></li>
<li><a href="/spec/10/">10/WAKU2</a></li>
<li><a href="/spec/12/">12/WAKU2-FILTER</a></li>
<li><a href="/spec/13/">13/WAKU2-STORE</a></li>
<li><a href="/spec/14/">14/WAKU2-MESSAGE</a></li>
<li><a href="/spec/15/">15/WAKU2-BRIDGE</a></li>
<li><a href="/spec/16/">16/WAKU2-RPC</a></li>
<li><a href="/spec/17/">17/WAKU2-RLN-RELAY</a></li>
<li><a href="/spec/18/">18/WAKU2-SWAP</a></li>
<li><a href="/spec/19/">19/WAKU2-LIGHTPUSH</a></li>
<li><a href="/spec/21/">21/WAKU2-FTSTORE</a></li>
<li><a href="/spec/22/">22/TOY-CHAT</a></li>
<li><a href="/spec/23/">23/WAKU2-TOPICS</a></li>
<li><a href="/spec/26/">26/WAKU2-PAYLOAD</a></li>
<li><a href="/spec/27/">27/WAKU2-PEERS</a></li>
<li><a href="/spec/29/"class=active>29/WAKU2-CONFIG</a></li>
<li><a href="/spec/30/">30/ADAPTIVE-NODES</a></li>
<li><a href="/spec/33/">33/WAKU2-DISCV5</a></li>
<li><a href="/spec/36/">36/WAKU2-BINDINGS-API</a></li>
<li><a href="/spec/53/">53/WAKU2-X3DH</a></li>
<li><a href="/spec/54/">54/WAKU2-X3DH-SESSIONS</a></li>
<li><a href="/spec/55/">55/STATUS-1TO1-CHAT</a></li>
<li><a href="/spec/56/">56/STATUS-COMMUNITIES</a></li>
</ul>
</li>
<li>Stable
<ul>
<li><a href="/spec/2/">2/MVDS</a></li>
<li><a href="/spec/6/">6/WAKU1</a></li>
<li><a href="/spec/7/">7/WAKU-DATA</a></li>
<li><a href="/spec/8/">8/WAKU-MAIL</a></li>
<li><a href="/spec/9/">9/WAKU-RPC</a></li>
<li><a href="/spec/11/">11/WAKU2-RELAY</a></li>
</ul>
</li>
<li>Deprecated
<ul>
<li><a href="/spec/5/">5/WAKU0</a></li>
</ul>
</li>
<li>Retired</li>
</ul>
</nav>
<script>(function(){var e=document.querySelector("aside.book-menu nav");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script>
</div>
</aside>
<div class="book-page">
<header class="book-header">
<div class="flex align-center justify-between">
<label for="menu-control">
<img src="/svg/menu.svg" class="book-icon" alt="Menu" />
</label>
<strong>29/WAKU2-CONFIG</strong>
<label for="toc-control">
<img src="/svg/toc.svg" class="book-icon" alt="Table of Contents" />
</label>
</div>
<aside class="hidden clearfix">
<nav id="TableOfContents">
<ul>
<li><a href="#gossipsub-v10-parameters">GossipSub v1.0 parameters</a></li>
<li><a href="#gossipsub-v11-parameters">GossipSub v1.1 parameters</a></li>
<li><a href="#other-configuration">Other configuration</a></li>
<li><a href="#copyright">Copyright</a></li>
<li><a href="#references">References</a></li>
</ul>
</nav>
</aside>
</header>
<article class="markdown">
<h1 id="29waku2-config">
29/WAKU2-CONFIG
<a class="anchor" href="#29waku2-config">#</a>
</h1>
<h1 id="waku-v2-client-parameter-configuration-recommendations">
Waku v2 Client Parameter Configuration Recommendations
<a class="anchor" href="#waku-v2-client-parameter-configuration-recommendations">#</a>
</h1>
<img src="https://img.shields.io/badge/status-draft-blue?style=flat-square" />
<ul>
<li>Status: draft</li>
<li>Editor: Hanno Cornelius <a href="mailto:hanno@status.im">hanno@status.im</a></li>
</ul><p><code>29/WAKU2-CONFIG</code> describes the RECOMMENDED values to assign to configurable parameters for Waku v2 clients.
Since Waku v2 is built on <a href="https://github.com/libp2p/specs">libp2p</a>,
most of the parameters and reasonable defaults are derived from there.</p>
<p>Waku v2 relay messaging is specified in <a href="/spec/11"><code>11/WAKU2-RELAY</code></a>,
a minor extension of the <a href="https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/README.md">libp2p GossipSub protocol</a>.
GossipSub behaviour is controlled by a series of adjustable parameters.
Waku v2 clients SHOULD configure these parameters to the recommended values below.</p>
<h1 id="gossipsub-v10-parameters">
GossipSub v1.0 parameters
<a class="anchor" href="#gossipsub-v10-parameters">#</a>
</h1>
<p>GossipSub v1.0 parameters are defined in the <a href="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&rsquo;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>
<td>2 minutes</td>
</tr>
</tbody>
</table>
<h1 id="gossipsub-v11-parameters">
GossipSub v1.1 parameters
<a class="anchor" href="#gossipsub-v11-parameters">#</a>
</h1>
<p>GossipSub v1.1 extended GossipSub v1.0 and introduced <a href="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 <a href="https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/gossipsub-v1.1.md#overview-of-new-parameters">specified by libp2p</a>.</p>
<h1 id="other-configuration">
Other configuration
<a class="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>
<td>5000</td>
</tr>
</tbody>
</table>
<h1 id="copyright">
Copyright
<a class="anchor" href="#copyright">#</a>
</h1>
<p>Copyright and related rights waived via
<a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0</a>.</p>
<h1 id="references">
References
<a class="anchor" href="#references">#</a>
</h1>
<ol>
<li><a href="/spec/11"><code>11/WAKU2-RELAY</code></a></li>
<li><a href="https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/gossipsub-v1.0.md#parameters">GossipSub v1.0 parameters</a></li>
<li><a href="https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/gossipsub-v1.1.md#overview-of-new-parameters">GossipSub v1.1 parameters</a></li>
<li><a href="https://github.com/libp2p/specs">libp2p</a></li>
<li><a href="https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/README.md">libp2p GossipSub protocol</a></li>
</ol>
</article>
<footer class="book-footer">
<div class="flex flex-wrap justify-between">
</div>
</footer>
<div class="book-comments">
</div>
<label for="menu-control" class="hidden book-menu-overlay"></label>
</div>
<aside class="book-toc">
<div class="book-toc-content">
<nav id="TableOfContents">
<ul>
<li><a href="#gossipsub-v10-parameters">GossipSub v1.0 parameters</a></li>
<li><a href="#gossipsub-v11-parameters">GossipSub v1.1 parameters</a></li>
<li><a href="#other-configuration">Other configuration</a></li>
<li><a href="#copyright">Copyright</a></li>
<li><a href="#references">References</a></li>
</ul>
</nav>
</div>
</aside>
</main>
</body>
</html>