diff --git a/README.md b/README.md index 02c548f..30ad939 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Waku Docs Portal +# Waku Documentation Portal -[![Waku Docs Portal](https://img.shields.io/badge/waku.guide-black)](https://waku.guide/) +[![Waku Documentation Portal](https://img.shields.io/badge/docs.waku.org-black)](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 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: diff --git a/diagrams/_history.md b/diagrams/_history.md index d4f5011..8a49593 100644 --- a/diagrams/_history.md +++ b/diagrams/_history.md @@ -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" diff --git a/docs/guides/run-nwaku-node.md b/docs/guides/run-nwaku-node.md index 203cca5..be47a40 100644 --- a/docs/guides/run-nwaku-node.md +++ b/docs/guides/run-nwaku-node.md @@ -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: + + + +```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": [] +}' +``` + + + ```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" } } ``` + + + :::info The `listenAddresses` field stores the transport addresses for accepting connections, while the `enrUri` field stores the `ENR` URI for peer discovery. ::: \ No newline at end of file diff --git a/docs/overview/concepts/peer-discovery/discv5.md b/docs/overview/concepts/discv5.md similarity index 100% rename from docs/overview/concepts/peer-discovery/discv5.md rename to docs/overview/concepts/discv5.md diff --git a/docs/overview/concepts/peer-discovery/dns-discovery.md b/docs/overview/concepts/dns-discovery.md similarity index 100% rename from docs/overview/concepts/peer-discovery/dns-discovery.md rename to docs/overview/concepts/dns-discovery.md diff --git a/docs/overview/concepts/network-domains.md b/docs/overview/concepts/network-domains.md index b806d3f..dad91f6 100644 --- a/docs/overview/concepts/network-domains.md +++ b/docs/overview/concepts/network-domains.md @@ -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 diff --git a/docs/overview/concepts/peer-discovery.md b/docs/overview/concepts/peer-discovery.md index 6b71790..8ab6de3 100644 --- a/docs/overview/concepts/peer-discovery.md +++ b/docs/overview/concepts/peer-discovery.md @@ -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) \ No newline at end of file +- [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) \ No newline at end of file diff --git a/docs/overview/concepts/peer-discovery/peer-exchange.md b/docs/overview/concepts/peer-exchange.md similarity index 100% rename from docs/overview/concepts/peer-discovery/peer-exchange.md rename to docs/overview/concepts/peer-exchange.md diff --git a/docs/overview/concepts/peer-discovery/predefined-nodes.md b/docs/overview/concepts/predefined-nodes.md similarity index 100% rename from docs/overview/concepts/peer-discovery/predefined-nodes.md rename to docs/overview/concepts/predefined-nodes.md diff --git a/docs/overview/reference/glossary.md b/docs/overview/reference/glossary.md index 06370b2..7fc3acc 100644 --- a/docs/overview/reference/glossary.md +++ b/docs/overview/reference/glossary.md @@ -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. diff --git a/docusaurus.config.js b/docusaurus.config.js index 2170c9b..8e6cfad 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -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", diff --git a/sidebars.js b/sidebars.js index 4eaba11..47913a8 100644 --- a/sidebars.js +++ b/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: 'Nodes and SDKs', + }, + { + type: 'html', + value: 'Presentations', + }, { 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: 'Nodes and SDKs', - }, - { - type: 'html', - value: 'Presentations', - }, + "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: 'Bug Bounty Program', - }, - ] - } + type: 'html', + value: 'Bug Bounty Program', + }, ] }; -module.exports = sidebars; +module.exports = sidebars; \ No newline at end of file