mirror of
https://github.com/waku-org/docs.waku.org.git
synced 2025-02-23 02:08:07 +00:00
Merge pull request #70 from waku-org/peer-discovery-reorg
peer discovery & sidebar reorg
This commit is contained in:
commit
98b4d6ec2e
@ -1,8 +1,8 @@
|
||||
# Waku Docs Portal
|
||||
# Waku Documentation Portal
|
||||
|
||||
[](https://waku.guide/)
|
||||
[](https://docs.waku.org/)
|
||||
|
||||
The Waku Docs Portal can be accessed at [waku.guide](https://waku.guide) and was built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
|
||||
The Waku Documentation Portal can be accessed at <https://docs.waku.org/> and was built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@ -14,7 +14,7 @@ The Waku Docs Portal can be accessed at [waku.guide](https://waku.guide) and was
|
||||
Clone this repository:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/waku-org/waku.guide
|
||||
git clone https://github.com/waku-org/docs.waku.org
|
||||
```
|
||||
|
||||
Install the dependencies:
|
||||
|
@ -1,5 +1,5 @@
|
||||
```mermaid
|
||||
%%{init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': {'showBranches': true, 'showCommitLabel':true,'mainBranchName': 'HISTORY'}} }%%
|
||||
%%{init: { 'gitGraph': {'showBranches': true, 'showCommitLabel': true, 'mainBranchName': 'HISTORY'}} }%%
|
||||
gitGraph
|
||||
commit id:"2013"
|
||||
commit id:"2015" tag:"R&D"
|
||||
|
@ -2,7 +2,7 @@
|
||||
title: Run a Nwaku Node
|
||||
---
|
||||
|
||||
Nwaku (formerly `nim-waku`) is a lightweight and robust Nim client for running a Waku node, equipped with tools to monitor and maintain a running node. Nwaku is highly configurable, enabling operators to select the [protocols](/overview/concepts/protocols) they wish to support based on their needs, motivations, and available resources.
|
||||
Nwaku (formerly `nim-waku`) is a lightweight and robust Nim client for running a Waku node, equipped with tools to monitor and maintain a running node. Nwaku is highly configurable, enabling operators to select the [protocols](/overview/concepts/protocols) they want to support based on their needs, motivations, and available resources.
|
||||
|
||||
This guide provides detailed steps to build, configure, and connect a `nwaku` node to the Waku Network. It also covers using existing tools to monitor and maintain the node.
|
||||
|
||||
@ -15,8 +15,8 @@ Before running a Nwaku node, it is necessary to build it. Nwaku provides multipl
|
||||
| Source Code | Build a `nwaku` node directly from the source code | [Build Nwaku from Source](https://github.com/waku-org/nwaku/blob/master/docs/operators/how-to/build.md) |
|
||||
| Precompiled Binary | Download a precompiled binary of the `nwaku` node | [Download Nwaku Binary](https://github.com/waku-org/nwaku/tags) |
|
||||
| Nightly Release | Try out the latest `nwaku` updates without compiling the binaries | [Download Nightly Release](https://github.com/waku-org/nwaku/releases/tag/nightly) |
|
||||
| Docker Container | Build and run a `nwaku` node in a Docker Container | [Build Nwaku in Docker Container](https://github.com/waku-org/nwaku/blob/master/docs/operators/docker-quickstart.md) |
|
||||
| DigitalOcean Droplet | Build and run a `nwaku` node on a DigitalOcean Droplet | [Build Nwaku on DigitalOcean Droplet](https://github.com/waku-org/nwaku/blob/master/docs/operators/droplet-quickstart.md) |
|
||||
| Docker Container | Build and run a `nwaku` node in a Docker Container | [Run Nwaku in Docker Container](https://github.com/waku-org/nwaku/blob/master/docs/operators/docker-quickstart.md) |
|
||||
| DigitalOcean Droplet | Build and run a `nwaku` node on a DigitalOcean Droplet | [Run Nwaku on DigitalOcean Droplet](https://github.com/waku-org/nwaku/blob/master/docs/operators/droplet-quickstart.md) |
|
||||
|
||||
:::info
|
||||
Nwaku can be built and run on Linux and macOS, while Windows support is currently experimental.
|
||||
@ -36,15 +36,15 @@ Once you have built the `nwaku` node, run it using the default configuration:
|
||||
|
||||
By default, a `nwaku` node is configured to do the following:
|
||||
|
||||
- Generate a new private key and libp2p identity.
|
||||
- Generate a new private key and `PeerID`.
|
||||
- Listen for incoming libp2p connections on the default TCP port (`60000`).
|
||||
- Subscribe to the default Pub/Sub topic (`/waku/2/default-waku/proto`).
|
||||
- Start the `JSON-RPC` HTTP server on the default port (`8545`).
|
||||
- Enable the `Relay` protocol for relaying messages.
|
||||
- Enable the `Store` protocol as a client, allowing it to query peers for historical messages but not persist any message itself.
|
||||
- Enable the `Store` protocol as a client, allowing it to query peers for historical messages but not store any message itself.
|
||||
|
||||
:::info
|
||||
For more advanced configurations like enabling other protocols or maintaining a consistent libp2p identity, please refer to the [Node Configuration Methods](https://github.com/waku-org/nwaku/blob/master/docs/operators/how-to/configure.md) guide.
|
||||
For more advanced configurations like enabling other protocols or maintaining a consistent `PeerID`, please refer to the [Configuration Methods](https://github.com/waku-org/nwaku/blob/master/docs/operators/how-to/configure.md) guide.
|
||||
:::
|
||||
|
||||
## Connect the Node
|
||||
@ -54,8 +54,8 @@ To join the Waku Network, nodes must connect with peers. Nwaku provides multiple
|
||||
| | Description | Documentation |
|
||||
| - | - | - |
|
||||
| Predefined Nodes | Configure the bootstrap nodes that `nwaku` should establish connections upon startup | [Configure Predefined Nodes](https://github.com/waku-org/nwaku/blob/master/docs/operators/how-to/connect.md#option-1-configure-peers-statically) |
|
||||
| DNS Discovery | Enable `nwaku` to locate peers to connect to using the `DNS Discovery` mechanism | [Discover Peers Using DNS Discovery](https://github.com/waku-org/nwaku/blob/master/docs/operators/how-to/configure-dns-disc.md) |
|
||||
| Discv5 | Enable `nwaku` to locate peers to connect to using the `Discv5` mechanism | [Discover Peers Using Discv5](https://github.com/waku-org/nwaku/blob/master/docs/operators/how-to/connect.md#option-3-discover-peers-using-waku-discovery-v5) |
|
||||
| DNS Discovery | Enable `nwaku` to locate peers to connect to using the `DNS Discovery` mechanism | [Configure DNS Discovery](https://github.com/waku-org/nwaku/blob/master/docs/operators/how-to/configure-dns-disc.md) |
|
||||
| Discv5 | Enable `nwaku` to locate peers to connect to using the `Discv5` mechanism | [Configure Discv5](https://github.com/waku-org/nwaku/blob/master/docs/operators/how-to/connect.md#option-3-discover-peers-using-waku-discovery-v5) |
|
||||
|
||||
:::info
|
||||
You can configure a `nwaku` node to use multiple peer discovery mechanisms simultaneously.
|
||||
@ -65,25 +65,44 @@ You can configure a `nwaku` node to use multiple peer discovery mechanisms simul
|
||||
|
||||
You can interact with a running `nwaku` node through the [JSON RPC API](https://rfc.vac.dev/spec/16/), such as querying the node information using the `get_waku_v2_debug_v1_info` method:
|
||||
|
||||
```bash
|
||||
curl -d '{"jsonrpc":"2.0","id":"id","method":"get_waku_v2_debug_v1_info", "params":[]}' --header "Content-Type: application/json" http://localhost:8545
|
||||
```mdx-code-block
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
```
|
||||
|
||||
You will get a response similar to:
|
||||
<Tabs>
|
||||
<TabItem value="request" label="Request">
|
||||
|
||||
```bash
|
||||
curl --location --request GET 'http://localhost:8545' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data '{
|
||||
"jsonrpc": "2.0",
|
||||
"id": "id",
|
||||
"method": "get_waku_v2_debug_v1_info",
|
||||
"params": []
|
||||
}'
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="response" label="Response">
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc":"2.0",
|
||||
"id":"id",
|
||||
"result":{
|
||||
"listenAddresses":[
|
||||
"/ip4/0.0.0.0/tcp/60000/p2p/16Uiu2HAmLU5Nwng9dWFZwM2DgJ5QGcUuDnefJyHJiXUCVaprhgL4"
|
||||
"jsonrpc": "2.0",
|
||||
"id": "id",
|
||||
"result": {
|
||||
"listenAddresses": [
|
||||
"/ip4/0.0.0.0/tcp/60000/p2p/16Uiu2HAmUbPquFQqje3jiqoB5YoiUbBya59NB4qqEzeiTNGHeA6w"
|
||||
],
|
||||
"enrUri":"enr:-IO4QDxToTg86pPCK2KvMeVCXC2ADVZWrxXSvNZeaoa0JhShbM5qed69RQz1s1mWEEqJ3aoklo_7EU9iIBcPMVeKlCQBgmlkgnY0iXNlY3AyNTZrMaEDdBHK1Gx6y_zv5DVw5Qb3DtSOMmVHTZO1WSORrF2loL2DdWRwgiMohXdha3UyAw"
|
||||
"enrUri": "enr:-Iu4QCQZXZDb_JsYmLoYor0F5E_95HbIywgO_wgx2rIdDbmCJZkTzmlCr0wmMzV47lgik_tVwww5mIng90Ris83TisMBgmlkgnY0gmlwhAAAAACJc2VjcDI1NmsxoQPszztG-Ev52ZB7tk0jF8s6Md4KvyY_rhzNZokaaB_ABIN0Y3CC6mCFd2FrdTIB"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
:::info
|
||||
The `listenAddresses` field stores the transport addresses for accepting connections, while the `enrUri` field stores the `ENR` URI for peer discovery.
|
||||
:::
|
@ -6,7 +6,7 @@ Waku is a unified and cohesive entity that offers a rich ecosystem with three di
|
||||
|
||||
## Discovery Domain
|
||||
|
||||
Peer discovery in Waku facilitates locating other nodes within the network. As a modular protocol, Waku incorporates various discovery mechanisms, such as [Discv5](/overview/concepts/peer-discovery/discv5) and [Peer Exchange](/overview/concepts/peer-discovery/peer-exchange). These mechanisms allow developers to choose the most suitable option(s) for their specific use cases and user environments, including mobile phones, desktop browsers, servers, and more.
|
||||
Peer discovery in Waku facilitates locating other nodes within the network. As a modular protocol, Waku incorporates various discovery mechanisms, such as [Discv5](/overview/concepts/discv5) and [Peer Exchange](/overview/concepts/peer-exchange). These mechanisms allow developers to choose the most suitable option(s) for their specific use cases and user environments, including mobile phones, desktop browsers, servers, and more.
|
||||
|
||||
## Gossip Domain
|
||||
|
||||
|
@ -12,7 +12,7 @@ Once a connection is established, the node must actively seek out additional pee
|
||||
|
||||
Waku supports multiple peer discovery mechanisms, such as:
|
||||
|
||||
- [Configuring Predefined Nodes](/overview/concepts/peer-discovery/predefined-nodes)
|
||||
- [Peer Discovery via DNS](/overview/concepts/peer-discovery/dns-discovery)
|
||||
- [Discv5 Ambient Peer Discovery](/overview/concepts/peer-discovery/discv5)
|
||||
- [Peer Exchange](/overview/concepts/peer-discovery/peer-exchange)
|
||||
- [Configuring Predefined Nodes](/overview/concepts/predefined-nodes)
|
||||
- [Peer Discovery via DNS](/overview/concepts/dns-discovery)
|
||||
- [Discv5 Ambient Peer Discovery](/overview/concepts/discv5)
|
||||
- [Peer Exchange](/overview/concepts/peer-exchange)
|
@ -18,11 +18,11 @@ A content topic is a string attached to [messages](#waku-message) to enable [pro
|
||||
|
||||
Dappnode is an open-source platform that simplifies the hosting and management of decentralized applications and blockchain nodes, including [Waku](#waku).
|
||||
|
||||
### [Discv5](/overview/concepts/peer-discovery/discv5)
|
||||
### [Discv5](/overview/concepts/discv5)
|
||||
|
||||
Discv5 is a [peer discovery](#peer-discovery) mechanism using a Distributed Hash Table (DHT) to store [ENR](#enr) records, providing censorship resistance, load distribution, and enhanced network resilience.
|
||||
|
||||
### [DNS Discovery](/overview/concepts/peer-discovery/dns-discovery)
|
||||
### [DNS Discovery](/overview/concepts/dns-discovery)
|
||||
|
||||
DNS discovery is a [peer discovery](#peer-discovery) mechanism that allows the retrieval of an [ENR](#enr) tree from the TXT field of a domain name, enabling the storage of [node](#node) connection details and promoting decentralization.
|
||||
|
||||
@ -38,6 +38,10 @@ Filter is a [protocol](#protocol) that enables [light nodes](#light-node) to sel
|
||||
|
||||
GossipSub is a [protocol](#protocol) for efficient and scalable information dissemination in decentralized networks commonly used in blockchain systems.
|
||||
|
||||
### [Libp2p](https://libp2p.io/)
|
||||
|
||||
Libp2p is a modular network stack and protocol suite that allows developers to build decentralized, peer-to-peer applications across various network protocols.
|
||||
|
||||
### Light Node
|
||||
|
||||
A light node is a [resource-limited](#resource-limited) device or client that leverages service nodes to access the [Relay](#relay) network.
|
||||
@ -66,10 +70,14 @@ A peer refers to other [nodes](#node) and participants of the [Waku Network](#wa
|
||||
|
||||
Peer discovery is when a [node](#node) locates and gets information about other [peers](#peer) in the [Waku Network](#waku).
|
||||
|
||||
### [Peer Exchange](/overview/concepts/peer-discovery/peer-exchange)
|
||||
### [Peer Exchange](/overview/concepts/peer-exchange)
|
||||
|
||||
Peer exchange is a [peer discovery](#peer-discovery) mechanism that enables [light nodes](#light-node) to request and receive peers from other nodes in the network, allowing them to bootstrap and expand their connections without depending on [Discv5](#discv5).
|
||||
|
||||
### Peer ID
|
||||
|
||||
`PeerID` is the unique identifier of a [node](#node) in the [Waku Network](#waku) generated from the cryptographic hash of the node's public key.
|
||||
|
||||
### [Protocol](/overview/concepts/protocols)
|
||||
|
||||
A protocol is a set of rules that enables [nodes](#node) within the [Waku Network](#waku) to perform various functionalities such as message sending, relaying, filtering, storing, retrieving, and more.
|
||||
|
@ -4,8 +4,8 @@ require("dotenv").config();
|
||||
|
||||
/** @type {import("@docusaurus/types").Config} */
|
||||
const config = {
|
||||
title: "Waku Docs Portal",
|
||||
url: "https://waku.guide/",
|
||||
title: "Waku Documentation",
|
||||
url: "https://docs.waku.org/",
|
||||
baseUrl: "/",
|
||||
onBrokenLinks: "throw",
|
||||
onBrokenMarkdownLinks: "warn",
|
||||
@ -27,9 +27,9 @@ const config = {
|
||||
routeBasePath: "/",
|
||||
path: "docs",
|
||||
sidebarPath: require.resolve("./sidebars.js"),
|
||||
editUrl: "https://github.com/waku-org/waku.guide/tree/develop/",
|
||||
showLastUpdateAuthor: false,
|
||||
editUrl: "https://github.com/waku-org/docs.waku.org/tree/develop/",
|
||||
showLastUpdateTime: true,
|
||||
breadcrumbs: false,
|
||||
},
|
||||
theme: {
|
||||
name: "default",
|
||||
|
115
sidebars.js
115
sidebars.js
@ -3,89 +3,68 @@
|
||||
/** @type {import("@docusaurus/plugin-content-docs").SidebarsConfig} */
|
||||
const sidebars = {
|
||||
main: [
|
||||
"overview/index",
|
||||
"overview/history",
|
||||
"overview/why-waku",
|
||||
"overview/use-cases",
|
||||
{
|
||||
type: 'html',
|
||||
value: '<a href="/guides/nodes-and-sdks" target="_blank" rel="noopener noreferrer" class="menu__link external-link">Nodes and SDKs<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.1918 4H3.42848V2.85715H13.1428V12.5714H11.9999V4.80813L3.83254 12.9755L3.02441 12.1674L11.1918 4Z" fill="white"/></svg>',
|
||||
},
|
||||
{
|
||||
type: 'html',
|
||||
value: '<a href="/presentations" target="_blank" rel="noopener noreferrer" class="menu__link external-link">Presentations<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.1918 4H3.42848V2.85715H13.1428V12.5714H11.9999V4.80813L3.83254 12.9755L3.02441 12.1674L11.1918 4Z" fill="white"/></svg>',
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "About Waku",
|
||||
collapsible: false,
|
||||
label: "Concepts",
|
||||
collapsed: false,
|
||||
items: [
|
||||
"overview/index",
|
||||
"overview/history",
|
||||
"overview/why-waku",
|
||||
"overview/use-cases",
|
||||
{
|
||||
type: 'html',
|
||||
value: '<a href="/guides/nodes-and-sdks" target="_blank" rel="noopener noreferrer" class="menu__link external-link">Nodes and SDKs<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.1918 4H3.42848V2.85715H13.1428V12.5714H11.9999V4.80813L3.83254 12.9755L3.02441 12.1674L11.1918 4Z" fill="white"/></svg>',
|
||||
},
|
||||
{
|
||||
type: 'html',
|
||||
value: '<a href="/presentations" target="_blank" rel="noopener noreferrer" class="menu__link external-link">Presentations<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.1918 4H3.42848V2.85715H13.1428V12.5714H11.9999V4.80813L3.83254 12.9755L3.02441 12.1674L11.1918 4Z" fill="white"/></svg>',
|
||||
},
|
||||
"overview/concepts/protocols",
|
||||
"overview/concepts/content-topics",
|
||||
"overview/concepts/network-domains",
|
||||
{
|
||||
type: "category",
|
||||
label: "Concepts",
|
||||
collapsed: false,
|
||||
label: "Peer Discovery",
|
||||
link: {
|
||||
type: "doc",
|
||||
id: "overview/concepts/peer-discovery",
|
||||
},
|
||||
items: [
|
||||
"overview/concepts/protocols",
|
||||
"overview/concepts/content-topics",
|
||||
"overview/concepts/network-domains",
|
||||
{
|
||||
type: "category",
|
||||
label: "Peer Discovery",
|
||||
link: {
|
||||
type: "doc",
|
||||
id: "overview/concepts/peer-discovery",
|
||||
},
|
||||
items: [
|
||||
"overview/concepts/peer-discovery/predefined-nodes",
|
||||
"overview/concepts/peer-discovery/dns-discovery",
|
||||
"overview/concepts/peer-discovery/discv5",
|
||||
"overview/concepts/peer-discovery/peer-exchange",
|
||||
]
|
||||
},
|
||||
"overview/concepts/transports",
|
||||
"overview/concepts/predefined-nodes",
|
||||
"overview/concepts/dns-discovery",
|
||||
"overview/concepts/discv5",
|
||||
"overview/concepts/peer-exchange",
|
||||
]
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Reference",
|
||||
items: [
|
||||
"overview/reference/glossary",
|
||||
"overview/reference/security-features",
|
||||
"overview/reference/research-in-progress",
|
||||
"overview/reference/waku-vs-libp2p",
|
||||
]
|
||||
}
|
||||
"overview/concepts/transports",
|
||||
]
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Reference",
|
||||
items: [
|
||||
"overview/reference/glossary",
|
||||
"overview/reference/security-features",
|
||||
"overview/reference/research-in-progress",
|
||||
"overview/reference/waku-vs-libp2p",
|
||||
]
|
||||
}
|
||||
],
|
||||
guides: [
|
||||
{
|
||||
type: "category",
|
||||
label: "Guides",
|
||||
collapsible: false,
|
||||
items: [
|
||||
"guides/nodes-and-sdks",
|
||||
"guides/run-nwaku-node",
|
||||
]
|
||||
}
|
||||
"guides/nodes-and-sdks",
|
||||
"guides/run-nwaku-node",
|
||||
],
|
||||
community: [
|
||||
"powered-by-waku",
|
||||
"community",
|
||||
"contribute",
|
||||
"presentations",
|
||||
{
|
||||
type: "category",
|
||||
label: "Community",
|
||||
collapsible: false,
|
||||
items: [
|
||||
"powered-by-waku",
|
||||
"community",
|
||||
"contribute",
|
||||
"presentations",
|
||||
{
|
||||
type: 'html',
|
||||
value: '<a href="https://hackenproof.com/status-dot-im/waku" target="_blank" rel="noopener noreferrer" class="menu__link external-link">Bug Bounty Program<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.1918 4H3.42848V2.85715H13.1428V12.5714H11.9999V4.80813L3.83254 12.9755L3.02441 12.1674L11.1918 4Z" fill="white"/></svg>',
|
||||
},
|
||||
]
|
||||
}
|
||||
type: 'html',
|
||||
value: '<a href="https://hackenproof.com/status-dot-im/waku" target="_blank" rel="noopener noreferrer" class="menu__link external-link">Bug Bounty Program<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.1918 4H3.42848V2.85715H13.1428V12.5714H11.9999V4.80813L3.83254 12.9755L3.02441 12.1674L11.1918 4Z" fill="white"/></svg>',
|
||||
},
|
||||
]
|
||||
};
|
||||
|
||||
module.exports = sidebars;
|
||||
module.exports = sidebars;
|
Loading…
x
Reference in New Issue
Block a user