mirror of
https://github.com/vacp2p/rfc-index.git
synced 2026-01-09 15:48:03 -05:00
874 lines
63 KiB
HTML
874 lines
63 KiB
HTML
<!DOCTYPE HTML>
|
|
<html lang="en" class="ayu" dir="ltr">
|
|
<head>
|
|
<!-- Book generated using mdBook -->
|
|
<meta charset="UTF-8">
|
|
<title>5/Waku0 - Vac RFC</title>
|
|
|
|
|
|
<!-- Custom HTML head -->
|
|
|
|
<meta name="description" content="">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="theme-color" content="#ffffff">
|
|
|
|
<link rel="icon" href="../../../favicon.svg">
|
|
<link rel="shortcut icon" href="../../../favicon.png">
|
|
<link rel="stylesheet" href="../../../css/variables.css">
|
|
<link rel="stylesheet" href="../../../css/general.css">
|
|
<link rel="stylesheet" href="../../../css/chrome.css">
|
|
<link rel="stylesheet" href="../../../css/print.css" media="print">
|
|
|
|
<!-- Fonts -->
|
|
<link rel="stylesheet" href="../../../FontAwesome/css/font-awesome.css">
|
|
<link rel="stylesheet" href="../../../fonts/fonts.css">
|
|
|
|
<!-- Highlight.js Stylesheets -->
|
|
<link rel="stylesheet" href="../../../highlight.css">
|
|
<link rel="stylesheet" href="../../../tomorrow-night.css">
|
|
<link rel="stylesheet" href="../../../ayu-highlight.css">
|
|
|
|
<!-- Custom theme stylesheets -->
|
|
<link rel="stylesheet" href="../../../custom.css">
|
|
|
|
</head>
|
|
<body class="sidebar-visible no-js">
|
|
<div id="body-container">
|
|
<!-- Provide site root to javascript -->
|
|
<script>
|
|
var path_to_root = "../../../";
|
|
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "ayu";
|
|
</script>
|
|
|
|
<!-- Work around some values being stored in localStorage wrapped in quotes -->
|
|
<script>
|
|
try {
|
|
var theme = localStorage.getItem('mdbook-theme');
|
|
var sidebar = localStorage.getItem('mdbook-sidebar');
|
|
|
|
if (theme.startsWith('"') && theme.endsWith('"')) {
|
|
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
|
|
}
|
|
|
|
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
|
|
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
|
|
}
|
|
} catch (e) { }
|
|
</script>
|
|
|
|
<!-- Set the theme before any content is loaded, prevents flash -->
|
|
<script>
|
|
var theme;
|
|
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
|
|
if (theme === null || theme === undefined) { theme = default_theme; }
|
|
var html = document.querySelector('html');
|
|
html.classList.remove('ayu')
|
|
html.classList.add(theme);
|
|
var body = document.querySelector('body');
|
|
body.classList.remove('no-js')
|
|
body.classList.add('js');
|
|
</script>
|
|
|
|
<input type="checkbox" id="sidebar-toggle-anchor" class="hidden">
|
|
|
|
<!-- Hide / unhide sidebar before it is displayed -->
|
|
<script>
|
|
var body = document.querySelector('body');
|
|
var sidebar = null;
|
|
var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
|
|
if (document.body.clientWidth >= 1080) {
|
|
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
|
|
sidebar = sidebar || 'visible';
|
|
} else {
|
|
sidebar = 'hidden';
|
|
}
|
|
sidebar_toggle.checked = sidebar === 'visible';
|
|
body.classList.remove('sidebar-visible');
|
|
body.classList.add("sidebar-" + sidebar);
|
|
</script>
|
|
|
|
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
|
|
<div class="sidebar-scrollbox">
|
|
<ol class="chapter"><li class="chapter-item expanded affix "><a href="../../../index.html">Introduction</a></li><li class="chapter-item expanded "><a href="../../../vac/index.html"><strong aria-hidden="true">1.</strong> Vac</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../../vac/1/coss.html"><strong aria-hidden="true">1.1.</strong> 1/COSS</a></li><li class="chapter-item expanded "><a href="../../../vac/2/mvds.html"><strong aria-hidden="true">1.2.</strong> 2/MVDS</a></li><li class="chapter-item expanded "><a href="../../../vac/3/remote-log.html"><strong aria-hidden="true">1.3.</strong> 3/Remote Log</a></li><li class="chapter-item expanded "><a href="../../../vac/4/mvds-meta.html"><strong aria-hidden="true">1.4.</strong> 4/MVDS Meta</a></li><li class="chapter-item expanded "><a href="../../../vac/25/libp2p-dns-discovery.html"><strong aria-hidden="true">1.5.</strong> 25/Libp2p DNS Discovery</a></li><li class="chapter-item expanded "><a href="../../../vac/32/rln-v1.html"><strong aria-hidden="true">1.6.</strong> 32/RLN-V1</a></li><li class="chapter-item expanded "><a href="../../../vac/raw/index.html"><strong aria-hidden="true">1.7.</strong> Raw</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../../vac/raw/consensus-hashgraphlike.html"><strong aria-hidden="true">1.7.1.</strong> Consensus Hashgraphlike</a></li><li class="chapter-item expanded "><a href="../../../vac/raw/decentralized-messaging-ethereum.html"><strong aria-hidden="true">1.7.2.</strong> Decentralized Messaging Ethereum</a></li><li class="chapter-item expanded "><a href="../../../vac/raw/eth-mls-offchain.html"><strong aria-hidden="true">1.7.3.</strong> ETH MLS Offchain</a></li><li class="chapter-item expanded "><a href="../../../vac/raw/eth-mls-onchain.html"><strong aria-hidden="true">1.7.4.</strong> ETH MLS Onchain</a></li><li class="chapter-item expanded "><a href="../../../vac/raw/deleted/eth-secpm.html"><strong aria-hidden="true">1.7.5.</strong> ETH SecPM</a></li><li class="chapter-item expanded "><a href="../../../vac/raw/gossipsub-tor-push.html"><strong aria-hidden="true">1.7.6.</strong> Gossipsub Tor Push</a></li><li class="chapter-item expanded "><a href="../../../vac/raw/logos-capability-discovery.html"><strong aria-hidden="true">1.7.7.</strong> Logos Capability Discovery</a></li><li class="chapter-item expanded "><a href="../../../vac/raw/mix.html"><strong aria-hidden="true">1.7.8.</strong> Mix</a></li><li class="chapter-item expanded "><a href="../../../vac/raw/noise-x3dh-double-ratchet.html"><strong aria-hidden="true">1.7.9.</strong> Noise X3DH Double Ratchet</a></li><li class="chapter-item expanded "><a href="../../../vac/raw/rln-interep-spec.html"><strong aria-hidden="true">1.7.10.</strong> RLN Interep Spec</a></li><li class="chapter-item expanded "><a href="../../../vac/raw/rln-stealth-commitments.html"><strong aria-hidden="true">1.7.11.</strong> RLN Stealth Commitments</a></li><li class="chapter-item expanded "><a href="../../../vac/raw/rln-v2.html"><strong aria-hidden="true">1.7.12.</strong> RLN-V2</a></li><li class="chapter-item expanded "><a href="../../../vac/raw/sds.html"><strong aria-hidden="true">1.7.13.</strong> SDS</a></li></ol></li><li class="chapter-item expanded "><a href="../../../vac/template.html"><strong aria-hidden="true">1.8.</strong> Template</a></li></ol></li><li class="chapter-item expanded "><a href="../../../waku/index.html"><strong aria-hidden="true">2.</strong> Waku</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../../waku/standards/core/index.html"><strong aria-hidden="true">2.1.</strong> Standards - Core</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../../waku/standards/core/10/waku2.html"><strong aria-hidden="true">2.1.1.</strong> 10/Waku2</a></li><li class="chapter-item expanded "><a href="../../../waku/standards/core/11/relay.html"><strong aria-hidden="true">2.1.2.</strong> 11/Relay</a></li><li class="chapter-item expanded "><a href="../../../waku/standards/core/12/filter.html"><strong aria-hidden="true">2.1.3.</strong> 12/Filter</a></li><li class="chapter-item expanded "><a href="../../../waku/standards/core/13/store.html"><strong aria-hidden="true">2.1.4.</strong> 13/Store</a></li><li class="chapter-item expanded "><a href="../../../waku/standards/core/14/message.html"><strong aria-hidden="true">2.1.5.</strong> 14/Message</a></li><li class="chapter-item expanded "><a href="../../../waku/standards/core/15/bridge.html"><strong aria-hidden="true">2.1.6.</strong> 15/Bridge</a></li><li class="chapter-item expanded "><a href="../../../waku/standards/core/17/rln-relay.html"><strong aria-hidden="true">2.1.7.</strong> 17/RLN Relay</a></li><li class="chapter-item expanded "><a href="../../../waku/standards/core/19/lightpush.html"><strong aria-hidden="true">2.1.8.</strong> 19/Lightpush</a></li><li class="chapter-item expanded "><a href="../../../waku/standards/core/31/enr.html"><strong aria-hidden="true">2.1.9.</strong> 31/ENR</a></li><li class="chapter-item expanded "><a href="../../../waku/standards/core/33/discv5.html"><strong aria-hidden="true">2.1.10.</strong> 33/Discv5</a></li><li class="chapter-item expanded "><a href="../../../waku/standards/core/34/peer-exchange.html"><strong aria-hidden="true">2.1.11.</strong> 34/Peer Exchange</a></li><li class="chapter-item expanded "><a href="../../../waku/standards/core/36/bindings-api.html"><strong aria-hidden="true">2.1.12.</strong> 36/Bindings API</a></li><li class="chapter-item expanded "><a href="../../../waku/standards/core/64/network.html"><strong aria-hidden="true">2.1.13.</strong> 64/Network</a></li><li class="chapter-item expanded "><a href="../../../waku/standards/core/66/metadata.html"><strong aria-hidden="true">2.1.14.</strong> 66/Metadata</a></li></ol></li><li class="chapter-item expanded "><a href="../../../waku/standards/application/index.html"><strong aria-hidden="true">2.2.</strong> Standards - Application</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../../waku/standards/application/20/toy-eth-pm.html"><strong aria-hidden="true">2.2.1.</strong> 20/Toy ETH PM</a></li><li class="chapter-item expanded "><a href="../../../waku/standards/application/26/payload.html"><strong aria-hidden="true">2.2.2.</strong> 26/Payload</a></li><li class="chapter-item expanded "><a href="../../../waku/standards/application/53/x3dh.html"><strong aria-hidden="true">2.2.3.</strong> 53/X3DH</a></li><li class="chapter-item expanded "><a href="../../../waku/standards/application/54/x3dh-sessions.html"><strong aria-hidden="true">2.2.4.</strong> 54/X3DH Sessions</a></li></ol></li><li class="chapter-item expanded "><a href="../../../waku/standards/legacy/index.html"><strong aria-hidden="true">2.3.</strong> Standards - Legacy</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../../waku/standards/legacy/6/waku1.html"><strong aria-hidden="true">2.3.1.</strong> 6/Waku1</a></li><li class="chapter-item expanded "><a href="../../../waku/standards/legacy/7/data.html"><strong aria-hidden="true">2.3.2.</strong> 7/Data</a></li><li class="chapter-item expanded "><a href="../../../waku/standards/legacy/8/mail.html"><strong aria-hidden="true">2.3.3.</strong> 8/Mail</a></li><li class="chapter-item expanded "><a href="../../../waku/standards/legacy/9/rpc.html"><strong aria-hidden="true">2.3.4.</strong> 9/RPC</a></li></ol></li><li class="chapter-item expanded "><a href="../../../waku/informational/index.html"><strong aria-hidden="true">2.4.</strong> Informational</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../../waku/informational/22/toy-chat.html"><strong aria-hidden="true">2.4.1.</strong> 22/Toy Chat</a></li><li class="chapter-item expanded "><a href="../../../waku/informational/23/topics.html"><strong aria-hidden="true">2.4.2.</strong> 23/Topics</a></li><li class="chapter-item expanded "><a href="../../../waku/informational/27/peers.html"><strong aria-hidden="true">2.4.3.</strong> 27/Peers</a></li><li class="chapter-item expanded "><a href="../../../waku/informational/29/config.html"><strong aria-hidden="true">2.4.4.</strong> 29/Config</a></li><li class="chapter-item expanded "><a href="../../../waku/informational/30/adaptive-nodes.html"><strong aria-hidden="true">2.4.5.</strong> 30/Adaptive Nodes</a></li></ol></li><li class="chapter-item expanded "><a href="../../../waku/deprecated/index.html"><strong aria-hidden="true">2.5.</strong> Deprecated</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../../waku/deprecated/5/waku0.html" class="active"><strong aria-hidden="true">2.5.1.</strong> 5/Waku0</a></li><li class="chapter-item expanded "><a href="../../../waku/deprecated/16/rpc.html"><strong aria-hidden="true">2.5.2.</strong> 16/RPC</a></li><li class="chapter-item expanded "><a href="../../../waku/deprecated/18/swap.html"><strong aria-hidden="true">2.5.3.</strong> 18/Swap</a></li><li class="chapter-item expanded "><a href="../../../waku/deprecated/fault-tolerant-store.html"><strong aria-hidden="true">2.5.4.</strong> Fault Tolerant Store</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../../nomos/index.html"><strong aria-hidden="true">3.</strong> Nomos</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../../nomos/raw/index.html"><strong aria-hidden="true">3.1.</strong> Raw</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../../nomos/raw/nomosda-encoding.html"><strong aria-hidden="true">3.1.1.</strong> NomosDA Encoding</a></li><li class="chapter-item expanded "><a href="../../../nomos/raw/nomosda-network.html"><strong aria-hidden="true">3.1.2.</strong> NomosDA Network</a></li><li class="chapter-item expanded "><a href="../../../nomos/raw/p2p-hardware-requirements.html"><strong aria-hidden="true">3.1.3.</strong> P2P Hardware Requirements</a></li><li class="chapter-item expanded "><a href="../../../nomos/raw/p2p-nat-solution.html"><strong aria-hidden="true">3.1.4.</strong> P2P NAT Solution</a></li><li class="chapter-item expanded "><a href="../../../nomos/raw/p2p-network-bootstrapping.html"><strong aria-hidden="true">3.1.5.</strong> P2P Network Bootstrapping</a></li><li class="chapter-item expanded "><a href="../../../nomos/raw/p2p-network.html"><strong aria-hidden="true">3.1.6.</strong> P2P Network</a></li><li class="chapter-item expanded "><a href="../../../nomos/raw/sdp.html"><strong aria-hidden="true">3.1.7.</strong> SDP</a></li></ol></li><li class="chapter-item expanded "><a href="../../../nomos/deprecated/index.html"><strong aria-hidden="true">3.2.</strong> Deprecated</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../../nomos/deprecated/claro.html"><strong aria-hidden="true">3.2.1.</strong> Claro</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../../codex/index.html"><strong aria-hidden="true">4.</strong> Codex</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../../codex/raw/index.html"><strong aria-hidden="true">4.1.</strong> Raw</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../../codex/raw/codex-block-exchange.html"><strong aria-hidden="true">4.1.1.</strong> Block Exchange</a></li><li class="chapter-item expanded "><a href="../../../codex/raw/codex-marketplace.html"><strong aria-hidden="true">4.1.2.</strong> Marketplace</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../../status/index.html"><strong aria-hidden="true">5.</strong> Status</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../../status/24/curation.html"><strong aria-hidden="true">5.1.</strong> 24/Curation</a></li><li class="chapter-item expanded "><a href="../../../status/28/featuring.html"><strong aria-hidden="true">5.2.</strong> 28/Featuring</a></li><li class="chapter-item expanded "><a href="../../../status/55/1to1-chat.html"><strong aria-hidden="true">5.3.</strong> 55/1-to-1 Chat</a></li><li class="chapter-item expanded "><a href="../../../status/56/communities.html"><strong aria-hidden="true">5.4.</strong> 56/Communities</a></li><li class="chapter-item expanded "><a href="../../../status/61/community-history-service.html"><strong aria-hidden="true">5.5.</strong> 61/Community History Service</a></li><li class="chapter-item expanded "><a href="../../../status/62/payloads.html"><strong aria-hidden="true">5.6.</strong> 62/Payloads</a></li><li class="chapter-item expanded "><a href="../../../status/63/keycard-usage.html"><strong aria-hidden="true">5.7.</strong> 63/Keycard Usage</a></li><li class="chapter-item expanded "><a href="../../../status/65/account-address.html"><strong aria-hidden="true">5.8.</strong> 65/Account Address</a></li><li class="chapter-item expanded "><a href="../../../status/71/push-notification-server.html"><strong aria-hidden="true">5.9.</strong> 71/Push Notification Server</a></li><li class="chapter-item expanded "><a href="../../../status/raw/index.html"><strong aria-hidden="true">5.10.</strong> Raw</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../../status/raw/simple-scaling.html"><strong aria-hidden="true">5.10.1.</strong> Simple Scaling</a></li><li class="chapter-item expanded "><a href="../../../status/raw/status-app-protocols.html"><strong aria-hidden="true">5.10.2.</strong> Status App Protocols</a></li><li class="chapter-item expanded "><a href="../../../status/raw/status-mvds.html"><strong aria-hidden="true">5.10.3.</strong> Status MVDS</a></li><li class="chapter-item expanded "><a href="../../../status/raw/url-data.html"><strong aria-hidden="true">5.10.4.</strong> URL Data</a></li><li class="chapter-item expanded "><a href="../../../status/raw/url-scheme.html"><strong aria-hidden="true">5.10.5.</strong> URL Scheme</a></li></ol></li><li class="chapter-item expanded "><a href="../../../status/deprecated/index.html"><strong aria-hidden="true">5.11.</strong> Deprecated</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../../status/deprecated/3rd-party.html"><strong aria-hidden="true">5.11.1.</strong> 3rd Party</a></li><li class="chapter-item expanded "><a href="../../../status/deprecated/account.html"><strong aria-hidden="true">5.11.2.</strong> Account</a></li><li class="chapter-item expanded "><a href="../../../status/deprecated/client.html"><strong aria-hidden="true">5.11.3.</strong> Client</a></li><li class="chapter-item expanded "><a href="../../../status/deprecated/dapp-browser-API-usage.html"><strong aria-hidden="true">5.11.4.</strong> Dapp Browser API Usage</a></li><li class="chapter-item expanded "><a href="../../../status/deprecated/eips.html"><strong aria-hidden="true">5.11.5.</strong> EIPs</a></li><li class="chapter-item expanded "><a href="../../../status/deprecated/ethereum-usage.html"><strong aria-hidden="true">5.11.6.</strong> Ethereum Usage</a></li><li class="chapter-item expanded "><a href="../../../status/deprecated/group-chat.html"><strong aria-hidden="true">5.11.7.</strong> Group Chat</a></li><li class="chapter-item expanded "><a href="../../../status/deprecated/IPFS-gateway-for-sticker-Pack.html"><strong aria-hidden="true">5.11.8.</strong> IPFS Gateway for Sticker Pack</a></li><li class="chapter-item expanded "><a href="../../../status/deprecated/keycard-usage-for-wallet-and-chat-keys.html"><strong aria-hidden="true">5.11.9.</strong> Keycard Usage for Wallet and Chat Keys</a></li><li class="chapter-item expanded "><a href="../../../status/deprecated/notifications.html"><strong aria-hidden="true">5.11.10.</strong> Notifications</a></li><li class="chapter-item expanded "><a href="../../../status/deprecated/payloads.html"><strong aria-hidden="true">5.11.11.</strong> Payloads</a></li><li class="chapter-item expanded "><a href="../../../status/deprecated/push-notification-server.html"><strong aria-hidden="true">5.11.12.</strong> Push Notification Server</a></li><li class="chapter-item expanded "><a href="../../../status/deprecated/secure-transport.html"><strong aria-hidden="true">5.11.13.</strong> Secure Transport</a></li><li class="chapter-item expanded "><a href="../../../status/deprecated/waku-mailserver.html"><strong aria-hidden="true">5.11.14.</strong> Waku Mailserver</a></li><li class="chapter-item expanded "><a href="../../../status/deprecated/waku-usage.html"><strong aria-hidden="true">5.11.15.</strong> Waku Usage</a></li><li class="chapter-item expanded "><a href="../../../status/deprecated/whisper-mailserver.html"><strong aria-hidden="true">5.11.16.</strong> Whisper Mailserver</a></li><li class="chapter-item expanded "><a href="../../../status/deprecated/whisper-usage.html"><strong aria-hidden="true">5.11.17.</strong> Whisper Usage</a></li></ol></li></ol></li></ol>
|
|
</div>
|
|
<div id="sidebar-resize-handle" class="sidebar-resize-handle">
|
|
<div class="sidebar-resize-indicator"></div>
|
|
</div>
|
|
</nav>
|
|
|
|
<!-- Track and set sidebar scroll position -->
|
|
<script>
|
|
var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox');
|
|
sidebarScrollbox.addEventListener('click', function(e) {
|
|
if (e.target.tagName === 'A') {
|
|
sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop);
|
|
}
|
|
}, { passive: true });
|
|
var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
|
|
sessionStorage.removeItem('sidebar-scroll');
|
|
if (sidebarScrollTop) {
|
|
// preserve sidebar scroll position when navigating via links within sidebar
|
|
sidebarScrollbox.scrollTop = sidebarScrollTop;
|
|
} else {
|
|
// scroll sidebar to current active section when navigating via "next/previous chapter" buttons
|
|
var activeSection = document.querySelector('#sidebar .active');
|
|
if (activeSection) {
|
|
activeSection.scrollIntoView({ block: 'center' });
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<div id="page-wrapper" class="page-wrapper">
|
|
|
|
<div class="page">
|
|
<div id="menu-bar-hover-placeholder"></div>
|
|
<div id="menu-bar" class="menu-bar sticky">
|
|
<div class="left-buttons">
|
|
<label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
|
<i class="fa fa-bars"></i>
|
|
</label>
|
|
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
|
|
<i class="fa fa-paint-brush"></i>
|
|
</button>
|
|
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
|
|
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
|
|
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
|
|
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
|
|
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
|
|
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
|
|
</ul>
|
|
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
|
|
<i class="fa fa-search"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<h1 class="menu-title">Vac RFC</h1>
|
|
|
|
<div class="right-buttons">
|
|
<a href="../../../print.html" title="Print this book" aria-label="Print this book">
|
|
<i id="print-button" class="fa fa-print"></i>
|
|
</a>
|
|
<a href="https://github.com/vacp2p/rfc-index" title="Git repository" aria-label="Git repository">
|
|
<i id="git-repository-button" class="fa fa-github"></i>
|
|
</a>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div id="search-wrapper" class="hidden">
|
|
<form id="searchbar-outer" class="searchbar-outer">
|
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
|
</form>
|
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
|
<div id="searchresults-header" class="searchresults-header"></div>
|
|
<ul id="searchresults">
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
|
|
<script>
|
|
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
|
|
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
|
|
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
|
|
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
|
|
});
|
|
</script>
|
|
|
|
<div id="content" class="content">
|
|
<main>
|
|
<h1 id="5waku0"><a class="header" href="#5waku0">5/WAKU0</a></h1>
|
|
<div class="table-wrapper"><table><thead><tr><th>Field</th><th>Value</th></tr></thead><tbody>
|
|
<tr><td>Name</td><td>Waku v0</td></tr>
|
|
<tr><td>Slug</td><td>5</td></tr>
|
|
<tr><td>Status</td><td>deprecated</td></tr>
|
|
<tr><td>Editor</td><td>Oskar Thorén <a href="mailto:oskarth@titanproxy.com">oskarth@titanproxy.com</a></td></tr>
|
|
<tr><td>Contributors</td><td>Adam Babik <a href="mailto:adam@status.im">adam@status.im</a>, Andrea Maria Piana <a href="mailto:andreap@status.im">andreap@status.im</a>, Dean Eigenmann <a href="mailto:dean@status.im">dean@status.im</a>, Kim De Mey <a href="mailto:kimdemey@status.im">kimdemey@status.im</a></td></tr>
|
|
</tbody></table>
|
|
</div><!-- timeline:start -->
|
|
<h2 id="timeline"><a class="header" href="#timeline">Timeline</a></h2>
|
|
<ul>
|
|
<li><strong>2025-12-22</strong> — <a href="https://github.com/vacp2p/rfc-index/blob/0f1855edcf68ef982c4ce478b67d660809aa9830/docs/waku/deprecated/5/waku0.md"><code>0f1855e</code></a> — Chore/fix headers (#239)</li>
|
|
<li><strong>2025-12-22</strong> — <a href="https://github.com/vacp2p/rfc-index/blob/b1a578393edf8487ccc97a5f25b25af9bf41efb3/docs/waku/deprecated/5/waku0.md"><code>b1a5783</code></a> — Chore/mdbook updates (#237)</li>
|
|
<li><strong>2025-12-18</strong> — <a href="https://github.com/vacp2p/rfc-index/blob/d03e699084774ebecef9c6d4662498907c5e2080/docs/waku/deprecated/5/waku0.md"><code>d03e699</code></a> — ci: add mdBook configuration (#233)</li>
|
|
<li><strong>2024-09-13</strong> — <a href="https://github.com/vacp2p/rfc-index/blob/3ab314d87d4525ff1296bf3d9ec634d570777b91/waku/deprecated/5/waku0.md"><code>3ab314d</code></a> — Fix Files for Linting (#94)</li>
|
|
<li><strong>2024-01-31</strong> — <a href="https://github.com/vacp2p/rfc-index/blob/97709637ad5a6ba7364191b4a4a3d1397ff41912/waku/deprecated/5/waku0.md"><code>9770963</code></a> — Rename WAKU0.md to waku0.md</li>
|
|
<li><strong>2024-01-31</strong> — <a href="https://github.com/vacp2p/rfc-index/blob/ac8fe6dbedc162e54c2faaa997b63a58ce364e7f/waku/deprecated/5/WAKU0.md"><code>ac8fe6d</code></a> — Rename waku/rfc/deprecated/5/WAKU0.md to waku/deprecated/5/WAKU0.md</li>
|
|
<li><strong>2024-01-27</strong> — <a href="https://github.com/vacp2p/rfc-index/blob/61f7641fdd055e71646ccabdc9c873899417323d/waku/rfc/deprecated/5/WAKU0.md"><code>61f7641</code></a> — Create WAKU0.md</li>
|
|
</ul>
|
|
<!-- timeline:end -->
|
|
<p>This specification describes the format of Waku messages within the ÐΞVp2p Wire Protocol.
|
|
This spec substitutes <a href="https://eips.ethereum.org/EIPS/eip-627">EIP-627</a>.
|
|
Waku is a fork of the original Whisper protocol that enables better usability
|
|
for resource restricted devices,
|
|
such as mostly-offline bandwidth-constrained smartphones.
|
|
It does this through (a) light node support,
|
|
(b) historic messages (with a mailserver)
|
|
(c) expressing topic interest for better bandwidth usage and
|
|
(d) basic rate limiting.</p>
|
|
<h2 id="motivation"><a class="header" href="#motivation">Motivation</a></h2>
|
|
<p>Waku was created to incrementally improve in areas that Whisper is lacking in,
|
|
with special attention to resource restricted devices.
|
|
We specify the standard for Waku messages
|
|
in order to ensure forward compatibility of different Waku clients,
|
|
backwards compatibility with Whisper clients,
|
|
as well as to allow multiple implementations of Waku and its capabilities.
|
|
We also modify the language to be more unambiguous, concise and consistent.</p>
|
|
<h2 id="definitions"><a class="header" href="#definitions">Definitions</a></h2>
|
|
<div class="table-wrapper"><table><thead><tr><th>Term</th><th>Definition</th></tr></thead><tbody>
|
|
<tr><td><strong>Light node</strong></td><td>A Waku node that does not forward any messages.</td></tr>
|
|
<tr><td><strong>Envelope</strong></td><td>Messages sent and received by Waku nodes.</td></tr>
|
|
<tr><td><strong>Node</strong></td><td>Some process that is able to communicate for Waku.</td></tr>
|
|
</tbody></table>
|
|
</div>
|
|
<h2 id="underlying-transports-and-prerequisites"><a class="header" href="#underlying-transports-and-prerequisites">Underlying Transports and Prerequisites</a></h2>
|
|
<h3 id="use-of-devp2p"><a class="header" href="#use-of-devp2p">Use of DevP2P</a></h3>
|
|
<p>For nodes to communicate, they MUST implement devp2p and run RLPx.
|
|
They MUST have some way of connecting to other nodes.
|
|
Node discovery is largely out of scope for this spec,
|
|
but see the appendix for some suggestions on how to do this.</p>
|
|
<h3 id="gossip-based-routing"><a class="header" href="#gossip-based-routing">Gossip based routing</a></h3>
|
|
<p>In Whisper, messages are gossiped between peers.
|
|
Whisper is a form of rumor-mongering protocol
|
|
that works by flooding to its connected peers based on some factors.
|
|
Messages are eligible for retransmission until their TTL expires.
|
|
A node SHOULD relay messages to all connected nodes
|
|
if an envelope matches their PoW and bloom filter settings.
|
|
If a node works in light mode, it MAY choose not to forward envelopes.
|
|
A node MUST NOT send expired envelopes,
|
|
unless the envelopes are sent as a <a href="./mailserver.html">mailserver</a> response.
|
|
A node SHOULD NOT send a message to a peer that it has already sent before.</p>
|
|
<h2 id="wire-specification"><a class="header" href="#wire-specification">Wire Specification</a></h2>
|
|
<h3 id="use-of-rlpx-transport-protocol"><a class="header" href="#use-of-rlpx-transport-protocol">Use of RLPx transport protocol</a></h3>
|
|
<p>All Waku messages are sent as devp2p RLPx transport protocol,
|
|
version 5<sup class="footnote-reference"><a href="#1">1</a></sup> packets.
|
|
These packets MUST be RLP-encoded arrays of data containing two objects:
|
|
packet code followed by another object (whose type depends on the packet code).
|
|
See <a href="https://github.com/ethereum/wiki/wiki/RLP">informal RLP spec</a> and
|
|
the <a href="https://ethereum.github.io/yellowpaper/paper.pdf">Ethereum Yellow Paper, appendix B</a>
|
|
for more details on RLP.</p>
|
|
<p>Waku is a RLPx subprotocol called <code>waku</code> with version <code>0</code>.
|
|
The version number corresponds to the major version in the header spec.
|
|
Minor versions should not break compatibility of <code>waku</code>,
|
|
this would result in a new major.
|
|
(Some exceptions to this apply in the Draft stage
|
|
of where client implementation is rapidly change).</p>
|
|
<h3 id="abnf-specification"><a class="header" href="#abnf-specification">ABNF specification</a></h3>
|
|
<p>Using <a href="https://tools.ietf.org/html/rfc5234">Augmented Backus-Naur form (ABNF)</a>
|
|
we have the following format:</p>
|
|
<pre><code class="language-abnf">; Packet codes 0 - 127 are reserved for Waku protocol
|
|
packet-code = 1*3DIGIT
|
|
|
|
; rate limits
|
|
limit-ip = 1*DIGIT
|
|
limit-peerid = 1*DIGIT
|
|
limit-topic = 1*DIGIT
|
|
|
|
rate-limits = "[" limit-ip limit-peerid limit-topic "]"
|
|
|
|
pow-requirement-key = 48
|
|
bloom-filter-key = 49
|
|
light-node-key = 50
|
|
confirmations-enabled-key = 51
|
|
rate-limits-key = 52
|
|
topic-interest-key = 53
|
|
|
|
status-options = "["
|
|
[ pow-requirement-key pow-requirement ]
|
|
[ bloom-filter-key bloom-filter ]
|
|
[ light-node-key light-node ]
|
|
[ confirmations-enabled-key confirmations-enabled ]
|
|
[ rate-limits-key rate-limits ]
|
|
[ topic-interest-key topic-interest ]
|
|
"]"
|
|
|
|
status = "[" version status-options "]"
|
|
|
|
status-update = status-options
|
|
|
|
; version is "an integer (as specified in RLP)"
|
|
version = DIGIT
|
|
|
|
confirmations-enabled = BIT
|
|
|
|
light-node = BIT
|
|
|
|
; pow is "a single floating point value of PoW.
|
|
; This value is the IEEE 754 binary representation
|
|
; of a 64-bit floating point number.
|
|
; Values of qNAN, sNAN, INF and -INF are not allowed.
|
|
; Negative values are also not allowed."
|
|
pow = 1*DIGIT "." 1*DIGIT
|
|
pow-requirement = pow
|
|
|
|
; bloom filter is "a byte array"
|
|
bloom-filter = *OCTET
|
|
|
|
waku-envelope = "[" expiry ttl topic data nonce "]"
|
|
|
|
; List of topics interested in
|
|
topic-interest = "[" *10000topic "]"
|
|
|
|
; 4 bytes (UNIX time in seconds)
|
|
expiry = 4OCTET
|
|
|
|
; 4 bytes (time-to-live in seconds)
|
|
ttl = 4OCTET
|
|
|
|
; 4 bytes of arbitrary data
|
|
topic = 4OCTET
|
|
|
|
; byte array of arbitrary size
|
|
; (contains encrypted message)
|
|
data = OCTET
|
|
|
|
; 8 bytes of arbitrary data
|
|
; (used for PoW calculation)
|
|
nonce = 8OCTET
|
|
|
|
messages = 1*waku-envelope
|
|
|
|
; mail server / client specific
|
|
p2p-request = waku-envelope
|
|
p2p-message = 1*waku-envelope
|
|
|
|
; packet-format needs to be paired with its
|
|
; corresponding packet-format
|
|
packet-format = "[" packet-code packet-format "]"
|
|
|
|
required-packet = 0 status /
|
|
1 messages /
|
|
22 status-update /
|
|
|
|
optional-packet = 126 p2p-request / 127 p2p-message
|
|
|
|
packet = "[" required-packet [ optional-packet ] "]"
|
|
</code></pre>
|
|
<p>All primitive types are RLP encoded. Note that, per RLP specification,
|
|
integers are encoded starting from <code>0x00</code>.</p>
|
|
<h3 id="packet-codes"><a class="header" href="#packet-codes">Packet Codes</a></h3>
|
|
<p>The message codes reserved for Waku protocol: 0 - 127.</p>
|
|
<p>Messages with unknown codes MUST be ignored without generating any error,
|
|
for forward compatibility of future versions.</p>
|
|
<p>The Waku sub-protocol MUST support the following packet codes:</p>
|
|
<div class="table-wrapper"><table><thead><tr><th>Name</th><th>Int Value</th></tr></thead><tbody>
|
|
<tr><td>Status</td><td>0</td></tr>
|
|
<tr><td>Messages</td><td>1</td></tr>
|
|
<tr><td>Status Update</td><td>22</td></tr>
|
|
</tbody></table>
|
|
</div>
|
|
<p>The following message codes are optional, but they are reserved for specific purpose.</p>
|
|
<div class="table-wrapper"><table><thead><tr><th>Name</th><th>Int Value</th><th>Comment</th></tr></thead><tbody>
|
|
<tr><td>Batch Ack</td><td>11</td><td></td></tr>
|
|
<tr><td>Message Response</td><td>12</td><td></td></tr>
|
|
<tr><td>P2P Request</td><td>126</td><td></td></tr>
|
|
<tr><td>P2P Message</td><td>127</td><td></td></tr>
|
|
</tbody></table>
|
|
</div>
|
|
<h3 id="packet-usage"><a class="header" href="#packet-usage">Packet usage</a></h3>
|
|
<h4 id="status"><a class="header" href="#status">Status</a></h4>
|
|
<p>The Status message serves as a Waku handshake and peers MUST exchange this
|
|
message upon connection. It MUST be sent after the RLPx handshake and prior to
|
|
any other Waku messages.</p>
|
|
<p>A Waku node MUST await the Status message from a peer
|
|
before engaging in other Waku protocol activity with that peer.
|
|
When a node does not receive the Status message from a peer,
|
|
before a configurable timeout, it SHOULD disconnect from that peer.</p>
|
|
<p>Upon retrieval of the Status message, the node SHOULD validate the message
|
|
received and validated the Status message. Note that its peer might not be in
|
|
the same state.</p>
|
|
<p>When a node is receiving other Waku messages from a peer before a Status
|
|
message is received,
|
|
the node MUST ignore these messages and SHOULD disconnect from that peer.
|
|
Status messages received after the handshake is completed MUST also be ignored.</p>
|
|
<p>The status message MUST contain an association list containing various options.
|
|
All options within this association list are OPTIONAL,
|
|
ordering of the key-value pairs is not guaranteed and
|
|
therefore MUST NOT be relied on.
|
|
Unknown keys in the association list SHOULD be ignored.</p>
|
|
<h4 id="messages"><a class="header" href="#messages">Messages</a></h4>
|
|
<p>This packet is used for sending the standard Waku envelopes.</p>
|
|
<h4 id="status-update"><a class="header" href="#status-update">Status Update</a></h4>
|
|
<p>The Status Update message is used to communicate an update
|
|
of the settings of the node.
|
|
The format is the same as the Status message, all fields are optional.
|
|
If none of the options are specified the message MUST be ignored and
|
|
considered a noop.
|
|
Fields that are omitted are considered unchanged,
|
|
fields that haven't changed SHOULD not be transmitted.</p>
|
|
<h5 id="pow-requirement-update"><a class="header" href="#pow-requirement-update">PoW Requirement update</a></h5>
|
|
<p>When PoW is updated, peers MUST NOT deliver the sender envelopes
|
|
with PoW lower than specified in this message.</p>
|
|
<p>PoW is defined as average number of iterations,
|
|
required to find the current BestBit
|
|
(the number of leading zero bits in the hash), divided by message size and TTL:</p>
|
|
<blockquote>
|
|
<p>PoW = (2**BestBit) / (size * TTL)</p>
|
|
</blockquote>
|
|
<p>PoW calculation:</p>
|
|
<pre><pre class="playground"><code class="language-rust"><span class="boring">#![allow(unused)]
|
|
</span><span class="boring">fn main() {
|
|
</span> fn short_rlp(envelope) = rlp of envelope, excluding env_nonce field.
|
|
fn pow_hash(envelope, env_nonce) = sha3(short_rlp(envelope) ++ env_nonce)
|
|
fn pow(pow_hash, size, ttl) = 2**leading_zeros(pow_hash) / (size * ttl)
|
|
<span class="boring">}</span></code></pre></pre>
|
|
<p>where size is the size of the RLP-encoded envelope,
|
|
excluding <code>env_nonce</code> field (size of <code>short_rlp(envelope)</code>).</p>
|
|
<h5 id="bloom-filter-update"><a class="header" href="#bloom-filter-update">Bloom filter update</a></h5>
|
|
<p>The bloom filter is used to identify a number of topics
|
|
to a peer without compromising (too much)
|
|
privacy over precisely what topics are of interest.
|
|
Precise control over the information content (and thus efficiency of the filter)
|
|
may be maintained through the addition of bits.</p>
|
|
<p>Blooms are formed by the bitwise OR operation on a number of bloomed topics.
|
|
The bloom function takes the topic and projects them onto a 512-bit slice.
|
|
At most, three bits are marked for each bloomed topic.</p>
|
|
<p>The projection function is defined as a mapping from a 4-byte slice S
|
|
to a 512-bit slice D; for ease of explanation, S will dereference to bytes,
|
|
whereas D will dereference to bits.</p>
|
|
<pre><code class="language-python"> LET D[*] = 0
|
|
FOREACH i IN { 0, 1, 2 } DO
|
|
LET n = S[i]
|
|
IF S[3] & (2 ** i) THEN n += 256
|
|
D[n] = 1
|
|
END FOR
|
|
</code></pre>
|
|
<p>A full bloom filter (all the bits set to 1)
|
|
means that the node is to be considered a <code>Full Node</code> and it will accept any topic.</p>
|
|
<p>If both Topic Interest and bloom filter are specified,
|
|
Topic Interest always takes precedence and bloom filter MUST be ignored.</p>
|
|
<p>If only bloom filter is specified, the current Topic Interest MUST be discarded and
|
|
only the updated bloom filter MUST be used when forwarding or posting envelopes.</p>
|
|
<p>A bloom filter with all bits set to 0 signals
|
|
that the node is not currently interested in receiving any envelope.</p>
|
|
<h5 id="topic-interest-update"><a class="header" href="#topic-interest-update">Topic Interest update</a></h5>
|
|
<p>This packet is used by Waku nodes for sharing their interest
|
|
in messages with specific topics.
|
|
It does this in a more bandwidth considerate way,
|
|
at the expense of some metadata protection.
|
|
Peers MUST only send envelopes with specified topics.</p>
|
|
<p>It is currently bounded to a maximum of 10000 topics.
|
|
If you are interested in more topics than that,
|
|
this is currently underspecified and likely requires updating it.
|
|
The constant is subject to change.</p>
|
|
<p>If only Topic Interest is specified,
|
|
the current bloom filter MUST be discarded and
|
|
only the updated Topic Interest MUST be used when forwarding or posting envelopes.</p>
|
|
<p>An empty array signals that the node
|
|
is not currently interested in receiving any envelope.</p>
|
|
<h5 id="rate-limits-update"><a class="header" href="#rate-limits-update">Rate Limits update</a></h5>
|
|
<p>This packet is used for informing other nodes of their self defined rate limits.</p>
|
|
<p>In order to provide basic Denial-of-Service attack protection,
|
|
each node SHOULD define its own rate limits.
|
|
The rate limits SHOULD be applied on IPs, peer IDs, and envelope topics.</p>
|
|
<p>Each node MAY decide to whitelist, i.e. do not rate limit, selected IPs or peer IDs.</p>
|
|
<p>If a peer exceeds node's rate limits, the connection between them MAY be dropped.</p>
|
|
<p>Each node SHOULD broadcast its rate limits to its peers using the rate limits packet.
|
|
The rate limits MAY also be sent as an optional parameter in the handshake.</p>
|
|
<p>Each node SHOULD respect rate limits advertised by its peers.
|
|
The number of packets SHOULD be throttled in order not to exceed peer's rate limits.
|
|
If the limit gets exceeded, the connection MAY be dropped by the peer.</p>
|
|
<h5 id="message-confirmations-update"><a class="header" href="#message-confirmations-update">Message Confirmations update</a></h5>
|
|
<p>Message confirmations tell a node that a message originating
|
|
from it has been received by its peers,
|
|
allowing a node to know whether a message has or has not been received.</p>
|
|
<p>A node MAY send a message confirmation for any batch of messages
|
|
received with a packet Messages Code.</p>
|
|
<p>A message confirmation is sent using Batch Acknowledge packet or
|
|
Message Response packet.
|
|
The Batch Acknowledge packet is followed by a keccak256 hash
|
|
of the envelopes batch data.</p>
|
|
<p>The current <code>version</code> of the message response is <code>1</code>.</p>
|
|
<p>Using <a href="https://tools.ietf.org/html/rfc5234">Augmented Backus-Naur form (ABNF)</a>
|
|
we have the following format:</p>
|
|
<pre><code class="language-abnf">; a version of the Message Response
|
|
version = 1*DIGIT
|
|
|
|
; keccak256 hash of the envelopes batch data (raw bytes) for which the confirmation is sent
|
|
hash = *OCTET
|
|
|
|
hasherror = *OCTET
|
|
|
|
; error code
|
|
code = 1*DIGIT
|
|
|
|
; a descriptive error message
|
|
description = *ALPHA
|
|
|
|
error = "[" hasherror code description "]"
|
|
errors = *error
|
|
|
|
response = "[" hash errors "]"
|
|
|
|
confirmation = "[" version response "]"
|
|
</code></pre>
|
|
<p>The supported codes:
|
|
<code>1</code>: means time sync error which happens when an envelope is too old or
|
|
created in the future (the root cause is no time sync between nodes).</p>
|
|
<p>The drawback of sending message confirmations
|
|
is that it increases the noise in the network because for each sent message,
|
|
a corresponding confirmation is broadcast by one or more peers.</p>
|
|
<h4 id="p2p-request"><a class="header" href="#p2p-request">P2P Request</a></h4>
|
|
<p>This packet is used for sending Dapp-level peer-to-peer requests,
|
|
e.g. Waku Mail Client requesting old messages from the <a href="./mailserver.html">Waku Mail Server</a>.</p>
|
|
<h4 id="p2p-message"><a class="header" href="#p2p-message">P2P Message</a></h4>
|
|
<p>This packet is used for sending the peer-to-peer messages,
|
|
which are not supposed to be forwarded any further.
|
|
E.g. it might be used by the Waku Mail Server for delivery of old
|
|
(expired) messages, which is otherwise not allowed.</p>
|
|
<h3 id="payload-encryption"><a class="header" href="#payload-encryption">Payload Encryption</a></h3>
|
|
<p>Asymmetric encryption uses the standard Elliptic Curve Integrated Encryption Scheme
|
|
with SECP-256k1 public key.</p>
|
|
<p>Symmetric encryption uses AES GCM algorithm with random 96-bit nonce.</p>
|
|
<h3 id="packet-code-rationale"><a class="header" href="#packet-code-rationale">Packet code Rationale</a></h3>
|
|
<p>Packet codes <code>0x00</code> and <code>0x01</code> are already used in all Waku / Whisper versions.
|
|
Packet code <code>0x02</code> and <code>0x03</code> were previously used in Whisper but
|
|
are deprecated as of Waku v0.4</p>
|
|
<p>Packet code <code>0x22</code> is used to dynamically change the settings of a node.</p>
|
|
<p>Packet codes <code>0x7E</code> and <code>0x7F</code> may be used to implement Waku Mail Server and Client.
|
|
Without P2P messages it would be impossible to deliver the old messages,
|
|
since they will be recognized as expired,
|
|
and the peer will be disconnected for violating the Whisper protocol.
|
|
They might be useful for other purposes
|
|
when it is not possible to spend time on PoW,
|
|
e.g. if a stock exchange will want to provide live feed about the latest trades.</p>
|
|
<h2 id="additional-capabilities"><a class="header" href="#additional-capabilities">Additional capabilities</a></h2>
|
|
<p>Waku supports multiple capabilities.
|
|
These include light node, rate limiting and bridging of traffic.
|
|
Here we list these capabilities, how they are identified,
|
|
what properties they have and what invariants they must maintain.</p>
|
|
<p>Additionally there is the capability of a mailserver
|
|
which is documented in its on <a href="mailserver.html">specification</a>.</p>
|
|
<h3 id="light-node"><a class="header" href="#light-node">Light node</a></h3>
|
|
<p>The rationale for light nodes is to allow for interaction with waku
|
|
on resource restricted devices as bandwidth can often be an issue.</p>
|
|
<p>Light nodes MUST NOT forward any incoming messages,
|
|
they MUST only send their own messages.
|
|
When light nodes happen to connect to each other,
|
|
they SHOULD disconnect.
|
|
As this would result in messages being dropped between the two.</p>
|
|
<p>Light nodes are identified by the <code>light_node</code> value in the status message.</p>
|
|
<h3 id="accounting-for-resources-experimental"><a class="header" href="#accounting-for-resources-experimental">Accounting for resources (experimental)</a></h3>
|
|
<p>Nodes MAY implement accounting, keeping track of resource usage.
|
|
It is heavily inspired by
|
|
Swarm's <a href="https://www.bokconsulting.com.au/wp-content/uploads/2016/09/tron-fischer-sw3.pdf">SWAP protocol</a>,
|
|
and works by doing pairwise accounting for resources.</p>
|
|
<p>Each node keeps track of resource usage with all other nodes.
|
|
Whenever an envelope is received from a node that is expected
|
|
(fits bloom filter or topic interest, is legal, etc) this is tracked.</p>
|
|
<p>Every epoch (say, every minute or every time an event happens)
|
|
statistics SHOULD be aggregated and saved by the client:</p>
|
|
<div class="table-wrapper"><table><thead><tr><th>peer</th><th>sent</th><th>received</th></tr></thead><tbody>
|
|
<tr><td>peer1</td><td>0</td><td>123</td></tr>
|
|
<tr><td>peer2</td><td>10</td><td>40</td></tr>
|
|
</tbody></table>
|
|
</div>
|
|
<p>In later versions this will be amended by nodes communication thresholds,
|
|
settlements and disconnect logic.</p>
|
|
<h2 id="upgradability-and-compatibility"><a class="header" href="#upgradability-and-compatibility">Upgradability and Compatibility</a></h2>
|
|
<h3 id="general-principles-and-policy"><a class="header" href="#general-principles-and-policy">General principles and policy</a></h3>
|
|
<p>These are policies that guide how we make decisions when it comes to upgradability,
|
|
compatibility, and extensibility:</p>
|
|
<ol>
|
|
<li>
|
|
<p>Waku aims to be compatible with previous and future versions.</p>
|
|
</li>
|
|
<li>
|
|
<p>In cases where we want to break this compatibility, we do so gracefully and
|
|
as a single decision point.</p>
|
|
</li>
|
|
<li>
|
|
<p>To achieve this,
|
|
we employ the following two general strategies:</p>
|
|
</li>
|
|
</ol>
|
|
<ul>
|
|
<li>a) Accretion (including protocol negotiation) over changing data</li>
|
|
<li>b) When we want to change things, we give it a new name
|
|
(for example, a version number).</li>
|
|
</ul>
|
|
<p>Examples:</p>
|
|
<ul>
|
|
<li>We enable bridging between <code>shh/6</code> and
|
|
<code>waku/0</code> until such a time as when we are ready to gracefully drop support
|
|
for <code>shh/6</code> (1, 2, 3).</li>
|
|
<li>When we add parameter fields, we (currently) do so by accreting them in a list,
|
|
so old clients can ignore new fields (dynamic list)
|
|
and new clients can use new capabilities (1, 3).</li>
|
|
<li>To better support (2) and (3) in the future,
|
|
we will likely release a new version that gives better support for open,
|
|
growable maps (association lists or native map type) (3)</li>
|
|
<li>When we we want to provide a new set of messages that have different requirements,
|
|
we do so under a new protocol version and employ protocol versioning.
|
|
This is a form of accretion at a level above -
|
|
it ensures a client can support both protocols at once and
|
|
drop support for legacy versions gracefully. (1,2,3)</li>
|
|
</ul>
|
|
<h3 id="backwards-compatibility"><a class="header" href="#backwards-compatibility">Backwards Compatibility</a></h3>
|
|
<p>Waku is a different subprotocol from Whisper so it isn't directly compatible.
|
|
However, the data format is the same,
|
|
so compatibility can be achieved by the use of a bridging mode as described below.
|
|
Any client which does not implement certain packet codes
|
|
should gracefully ignore the packets with those codes.
|
|
This will ensure the forward compatibility.</p>
|
|
<h3 id="waku-whisper-bridging"><a class="header" href="#waku-whisper-bridging">Waku-Whisper bridging</a></h3>
|
|
<p><code>waku/0</code> and <code>shh/6</code> are different DevP2P subprotocols,
|
|
however they share the same data format making their envelopes compatible.
|
|
This means we can bridge the protocols naively, this works as follows.</p>
|
|
<p><strong>Roles:</strong></p>
|
|
<ul>
|
|
<li>Waku client A, only Waku capability</li>
|
|
<li>Whisper client B, only Whisper capability</li>
|
|
<li>WakuWhisper bridge C, both Waku and Whisper capability</li>
|
|
</ul>
|
|
<p><strong>Flow:</strong></p>
|
|
<ol>
|
|
<li>A posts message; B posts message.</li>
|
|
<li>C picks up message from A and B and relays them both to Waku and Whisper.</li>
|
|
<li>A receives message on Waku; B on Whisper.</li>
|
|
</ol>
|
|
<p><strong>Note</strong>: This flow means if another bridge C1 is active,
|
|
we might get duplicate relaying for a message between C1 and C2.
|
|
I.e. Whisper(<>Waku<>Whisper)<>Waku, A-C1-C2-B.
|
|
Theoretically this bridging chain can get as long as TTL permits.</p>
|
|
<h3 id="forward-compatibility"><a class="header" href="#forward-compatibility">Forward Compatibility</a></h3>
|
|
<p>It is desirable to have a strategy for maintaining forward compatibility
|
|
between <code>waku/0</code> and future version of waku.
|
|
Here we outline some concerns and strategy for this.</p>
|
|
<ul>
|
|
<li>
|
|
<p><strong>Connecting to nodes with multiple versions:</strong>
|
|
The way this SHOULD be accomplished in the future
|
|
is by negotiating the versions of subprotocols,
|
|
within the <code>hello</code> message nodes transmit their capabilities along with a version.
|
|
As suggested in <a href="https://eips.ethereum.org/EIPS/eip-8">EIP-8</a>,
|
|
if a node connects that has a higher version number for a specific capability,
|
|
the node with a lower number SHOULD assume backwards compatibility.
|
|
The node with the higher version
|
|
will decide if compatibility can be assured between versions,
|
|
if this is not the case it MUST disconnect.</p>
|
|
</li>
|
|
<li>
|
|
<p><strong>Adding new packet codes:</strong>
|
|
New packet codes can be added easily due to the available packet codes.
|
|
Unknown packet codes SHOULD be ignored.
|
|
Upgrades that add new packet codes SHOULD implement some fallback mechanism
|
|
if no response was received for nodes that do not yet understand this packet.</p>
|
|
</li>
|
|
<li>
|
|
<p><strong>Adding new options in <code>status-options</code>:</strong>
|
|
New options can be added to the <code>status-options</code> association list
|
|
in the <code>status</code> and <code>status-update</code> packet as options are OPTIONAL and
|
|
unknown option keys SHOULD be ignored.
|
|
A node SHOULD NOT disconnect from a peer
|
|
when receiving <code>status-options</code> with unknown option keys.</p>
|
|
</li>
|
|
</ul>
|
|
<h2 id="appendix-a-security-considerations"><a class="header" href="#appendix-a-security-considerations">Appendix A: Security considerations</a></h2>
|
|
<p>There are several security considerations to take into account when running Waku.
|
|
Chief among them are: scalability, DDoS-resistance and privacy.
|
|
These also vary depending on what capabilities are used.
|
|
The security considerations for extra capabilities such as <a href="./mailserver.html#security-considerations">mailservers</a>
|
|
can be found in their respective specifications.</p>
|
|
<h3 id="scalability-and-ux"><a class="header" href="#scalability-and-ux">Scalability and UX</a></h3>
|
|
<p><strong>Bandwidth usage:</strong></p>
|
|
<p>In version 0 of Waku, bandwidth usage is likely to be an issue.
|
|
For more investigation into this,
|
|
see the theoretical scaling model described <a href="https://github.com/vacp2p/research/tree/dcc71f4779be832d3b5ece9c4e11f1f7ec24aac2/whisper_scalability">here</a>.</p>
|
|
<p><strong>Gossip-based routing:</strong></p>
|
|
<p>Use of gossip-based routing doesn't necessarily scale.
|
|
It means each node can see a message multiple times,
|
|
and having too many light nodes can cause propagation probability that is too low.
|
|
See <a href="https://our.status.im/whisper-pss-comparison/">Whisper vs PSS</a>
|
|
for more and a possible Kademlia based alternative.</p>
|
|
<p><strong>Lack of incentives:</strong></p>
|
|
<p>Waku currently lacks incentives to run nodes,
|
|
which means node operators are more likely to create centralized choke points.</p>
|
|
<h3 id="privacy"><a class="header" href="#privacy">Privacy</a></h3>
|
|
<p><strong>Light node privacy:</strong></p>
|
|
<p>The main privacy concern with light nodes
|
|
is that directly connected peers will know that a message originates from them
|
|
(as it are the only ones it sends).
|
|
This means nodes can make assumptions about what messages (topics)
|
|
their peers are interested in.</p>
|
|
<p><strong>Bloom filter privacy:</strong></p>
|
|
<p>By having a bloom filter where only the topics you are interested in are set,
|
|
you reveal which messages you are interested in.
|
|
This is a fundamental tradeoff between bandwidth usage and privacy,
|
|
though the tradeoff space is likely suboptimal in terms of the
|
|
<a href="https://eprint.iacr.org/2017/954.pdf">Anonymity</a> <a href="https://petsymposium.org/2019/files/hotpets/slides/coordination-helps-anonymity-slides.pdf">trilemma</a>.</p>
|
|
<p><strong>Privacy guarantees not rigorous:</strong></p>
|
|
<p>Privacy for Whisper / Waku haven't been studied rigorously for various threat models
|
|
like global passive adversary, local active attacker, etc.
|
|
This is unlike e.g. Tor and mixnets.</p>
|
|
<p><strong>Topic hygiene:</strong></p>
|
|
<p>Similar to bloom filter privacy,
|
|
if you use a very specific topic you reveal more information.
|
|
See scalability model linked above.</p>
|
|
<h3 id="spam-resistance"><a class="header" href="#spam-resistance">Spam resistance</a></h3>
|
|
<p><strong>PoW bad for heterogeneous devices:</strong></p>
|
|
<p>Proof of work is a poor spam prevention mechanism.
|
|
A mobile device can only have a very low PoW
|
|
in order not to use too much CPU / burn up its phone battery.
|
|
This means someone can spin up a powerful node and overwhelm the network.</p>
|
|
<h3 id="censorship-resistance"><a class="header" href="#censorship-resistance">Censorship resistance</a></h3>
|
|
<p><strong>Devp2p TCP port blockable:</strong></p>
|
|
<p>By default Devp2p runs on port <code>30303</code>,
|
|
which is not commonly used for any other service.
|
|
This means it is easy to censor, e.g. airport WiFi.
|
|
This can be mitigated somewhat by running on e.g. port <code>80</code> or <code>443</code>,
|
|
but there are still outstanding issues.
|
|
See libp2p and Tor's Pluggable Transport for how this can be improved.</p>
|
|
<h2 id="appendix-b-implementation-notes"><a class="header" href="#appendix-b-implementation-notes">Appendix B: Implementation Notes</a></h2>
|
|
<h3 id="implementation-matrix"><a class="header" href="#implementation-matrix">Implementation Matrix</a></h3>
|
|
<div class="table-wrapper"><table><thead><tr><th>Client</th><th>Spec supported</th><th>Details</th></tr></thead><tbody>
|
|
<tr><td><strong>Status-go</strong></td><td>0.5</td><td><a href="https://github.com/status-im/status-go/blob/develop/WAKU.md">details</a></td></tr>
|
|
<tr><td><strong>Nimbus</strong></td><td>0.4</td><td><a href="https://github.com/status-im/nimbus/tree/8747fe1ecd36fe778bb92b97634db84d364fede8/waku">details</a></td></tr>
|
|
</tbody></table>
|
|
</div>
|
|
<h3 id="recommendations-for-clients"><a class="header" href="#recommendations-for-clients">Recommendations for clients</a></h3>
|
|
<p>Notes useful for implementing Waku mode.</p>
|
|
<ul>
|
|
<li>Avoid duplicate envelopes:</li>
|
|
</ul>
|
|
<p>To avoid duplicate envelopes, only connect to one Waku node.
|
|
Benign duplicate envelopes is an intrinsic property of Whisper
|
|
which often leads to a N factor increase in traffic,
|
|
where N is the number of peers you are connected to.</p>
|
|
<ul>
|
|
<li>Topic specific recommendations -</li>
|
|
</ul>
|
|
<p>Consider partition topics based on some usage,
|
|
to avoid too much traffic on a single topic.</p>
|
|
<h3 id="node-discovery"><a class="header" href="#node-discovery">Node discovery</a></h3>
|
|
<p>Resource restricted devices SHOULD use
|
|
<a href="https://eips.ethereum.org/EIPS/eip-1459">EIP-1459</a> to discover nodes.</p>
|
|
<p>Known static nodes MAY also be used.</p>
|
|
<h2 id="changelog"><a class="header" href="#changelog">Changelog</a></h2>
|
|
<h3 id="version-06"><a class="header" href="#version-06">Version 0.6</a></h3>
|
|
<p>Released <a href="https://github.com/vacp2p/specs/commit/9e650995f24179844857520c68fa3e8f6018b125">April 21,2020</a></p>
|
|
<ul>
|
|
<li>Mark spec as Deprecated mode in terms of its lifecycle.</li>
|
|
</ul>
|
|
<h3 id="version-05"><a class="header" href="#version-05">Version 0.5</a></h3>
|
|
<p>Released <a href="https://github.com/vacp2p/specs/commit/7b9dc562bc50c6bb844ac575cb221ec9cda2530a">March 17,2020</a></p>
|
|
<ul>
|
|
<li>Clarify the preferred way of handling unknown keys
|
|
in the <code>status-options</code> association list.</li>
|
|
<li>Correct spec/implementation mismatch:
|
|
Change RLP keys to be the their int values in order to reflect production behavior</li>
|
|
</ul>
|
|
<h3 id="version-04"><a class="header" href="#version-04">Version 0.4</a></h3>
|
|
<p>Released <a href="https://github.com/vacp2p/specs/commit/17bd066e317bbe33af07146b721d73f24de47e88">February 21, 2020</a>.</p>
|
|
<ul>
|
|
<li>Simplify implementation matrix with latest state</li>
|
|
<li>Introduces a new required packet code Status Code (<code>0x22</code>)
|
|
for communicating option changes</li>
|
|
<li>Deprecates the following packet codes:
|
|
PoW Requirement (<code>0x02</code>), Bloom Filter (<code>0x03</code>), Rate limits (<code>0x20</code>),
|
|
Topic interest (<code>0x21</code>) - all superseded by the new Status Code (<code>0x22</code>)</li>
|
|
<li>Increased <code>topic-interest</code> capacity from 1000 to 10000</li>
|
|
</ul>
|
|
<h3 id="version-03"><a class="header" href="#version-03">Version 0.3</a></h3>
|
|
<p>Released <a href="https://github.com/vacp2p/specs/commit/73138d6ba954ab4c315e1b8d210ac7631b6d1428">February 13, 2020</a>.</p>
|
|
<ul>
|
|
<li>Recommend DNS based node discovery over other Discovery methods.</li>
|
|
<li>Mark spec as Draft mode in terms of its lifecycle.</li>
|
|
<li>Simplify Changelog and misc formatting.</li>
|
|
<li>Handshake/Status message not compatible with shh/6 nodes;
|
|
specifying options as association list.</li>
|
|
<li>Include topic-interest in Status handshake.</li>
|
|
<li>Upgradability policy.</li>
|
|
<li><code>topic-interest</code> packet code.</li>
|
|
</ul>
|
|
<h3 id="version-02"><a class="header" href="#version-02">Version 0.2</a></h3>
|
|
<p>Released <a href="https://github.com/vacp2p/specs/blob/waku-0.2.0/waku.md">December 10, 2019</a>.</p>
|
|
<ul>
|
|
<li>General style improvements.</li>
|
|
<li>Fix ABNF grammar.</li>
|
|
<li>Mailserver requesting/receiving.</li>
|
|
<li>New packet codes: topic-interest (experimental), rate limits (experimental).</li>
|
|
<li>More details on handshake modifications.</li>
|
|
<li>Accounting for resources mode (experimental)</li>
|
|
<li>Appendix with security considerations: scalability and UX, privacy, and spam resistance.</li>
|
|
<li>Appendix with implementation notes and
|
|
implementation matrix across various clients with breakdown per capability.</li>
|
|
<li>More details on handshake and parameters.</li>
|
|
<li>Describe rate limits in more detail.</li>
|
|
<li>More details on mailserver and mail client API.</li>
|
|
<li>Accounting for resources mode (very experimental).</li>
|
|
<li>Clarify differences with Whisper.</li>
|
|
</ul>
|
|
<h3 id="version-01"><a class="header" href="#version-01">Version 0.1</a></h3>
|
|
<p>Initial version. Released <a href="https://github.com/vacp2p/specs/blob/b59b9247f2ac1bf45c75bd3227a2e5dd87b6d7b0/waku.md">November 21, 2019</a>.</p>
|
|
<h3 id="differences-between-shh6-and-waku0"><a class="header" href="#differences-between-shh6-and-waku0">Differences between shh/6 and waku/0</a></h3>
|
|
<p>Summary of main differences between this spec and Whisper v6, as described in <a href="https://eips.ethereum.org/EIPS/eip-627">EIP-627</a>:</p>
|
|
<ul>
|
|
<li>RLPx subprotocol is changed from <code>shh/6</code> to <code>waku/0</code>.</li>
|
|
<li>Light node capability is added.</li>
|
|
<li>Optional rate limiting is added.</li>
|
|
<li>Status packet has following additional parameters: light-node,
|
|
confirmations-enabled and rate-limits</li>
|
|
<li>Mail Server and Mail Client functionality is now part of the specification.</li>
|
|
<li>P2P Message packet contains a list of envelopes instead of a single envelope.</li>
|
|
</ul>
|
|
<h2 id="copyright"><a class="header" href="#copyright">Copyright</a></h2>
|
|
<p>Copyright and related rights waived via <a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0</a>.</p>
|
|
<h2 id="footnotes"><a class="header" href="#footnotes">Footnotes</a></h2>
|
|
<div class="footnote-definition" id="1"><sup class="footnote-definition-label">1</sup>
|
|
<p>Felix Lange et al. <a href="https://github.com/ethereum/devp2p/blob/master/rlpx.md">The RLPx Transport Protocol</a>. Ethereum.</p>
|
|
</div>
|
|
|
|
</main>
|
|
|
|
<nav class="nav-wrapper" aria-label="Page navigation">
|
|
<!-- Mobile navigation buttons -->
|
|
<a rel="prev" href="../../../waku/deprecated/index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
|
|
<i class="fa fa-angle-left"></i>
|
|
</a>
|
|
|
|
<a rel="next prefetch" href="../../../waku/deprecated/16/rpc.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
|
|
<i class="fa fa-angle-right"></i>
|
|
</a>
|
|
|
|
<div style="clear: both"></div>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
|
|
<nav class="nav-wide-wrapper" aria-label="Page navigation">
|
|
<a rel="prev" href="../../../waku/deprecated/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
|
|
<i class="fa fa-angle-left"></i>
|
|
</a>
|
|
|
|
<a rel="next prefetch" href="../../../waku/deprecated/16/rpc.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
|
|
<i class="fa fa-angle-right"></i>
|
|
</a>
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
window.playground_copyable = true;
|
|
</script>
|
|
|
|
|
|
<script src="../../../elasticlunr.min.js"></script>
|
|
<script src="../../../mark.min.js"></script>
|
|
<script src="../../../searcher.js"></script>
|
|
|
|
<script src="../../../clipboard.min.js"></script>
|
|
<script src="../../../highlight.js"></script>
|
|
<script src="../../../book.js"></script>
|
|
|
|
<!-- Custom JS scripts -->
|
|
<script src="../../../scripts/rfc-index.js"></script>
|
|
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|