add run nwaku guide

This commit is contained in:
LordGhostX 2023-06-09 20:32:04 +01:00
parent 1973a5791b
commit 64e5c21366
No known key found for this signature in database
GPG Key ID: 520CC5DC4F94FCC7
15 changed files with 102 additions and 30 deletions

View File

@ -38,6 +38,7 @@
"Secureum",
"Oskar",
"Thorén",
"wakunode",
"autoplay"
],
"flagWords": [],
@ -64,7 +65,11 @@
{
"name": "youtube-link",
"pattern": "/< youtube.*/"
},
{
"name": "enrUri",
"pattern": "/enr:-.*/"
}
],
"ignoreRegExpList": ["multiaddr", "dnsMultiaddr", "wss", "youtube-link"]
"ignoreRegExpList": ["multiaddr", "dnsMultiaddr", "wss", "youtube-link", "enrUri"]
}

View File

@ -30,7 +30,7 @@ You can also interact with these examples live:
an economic spam protection protocol that rate limit using zero-knowledge for privacy preserving purposes.
To gain a deeper understanding of Waku, visit the [overview documentation](/).
If you're interested in learning how Waku works under the hood, check out the specs at [rfc.vac.dev](https://rfc.vac.dev/).
If you are interested in learning how Waku works under the hood, check out the specs at [rfc.vac.dev](https://rfc.vac.dev/).
## Bugs, Questions & Support

View File

@ -2,7 +2,7 @@
title: Join Our Community
---
Welcome to the Waku Community! Whether you're interested in building with Waku, contributing to the network, expanding your knowledge, or staying up-to-date with our progress, we have something for everyone.
Welcome to the Waku Community! Whether you are interested in building with Waku, contributing to the network, expanding your knowledge, or staying up-to-date with our progress, we have something for everyone.
## [Discord](https://discord.waku.org/)

View File

@ -4,7 +4,7 @@ title: Contribute to Waku
Get involved in Waku's open-source initiatives to improve the protocols, SDKs, developer tools and examples, and documentation. You can contribute by:
- [Operating a node](/guides/nodes-and-sdks#operate-a-waku-node) within your application.
- [Operating a node](/guides/nodes-and-sdks#run-a-waku-node) within your application.
- [Reporting bugs](#report-a-bug) and [suggesting missing features](#suggest-a-feature) to the development team.
- Inspiring other developers to explore and use Waku for [various use cases](/overview/use-cases).

View File

@ -8,20 +8,20 @@ Waku has risks and limitations as it is still developing and preparing for exten
Ready to integrate Waku into your application for private, secure, censorship-free communication? Explore the available SDKs and contribute by operating a node.
## Operate a Waku Node
## Run a Waku Node
The Waku Network is a decentralized, permissionless system where anyone can run nodes, use the network, and contribute to its support.
| Client | Description | Documentation |
| | Description | Documentation |
| - | - | - |
| [nwaku](https://github.com/waku-org/nwaku) | Nim-based Waku implementation to run a standalone node and access the network (recommended) | [Run Nwaku Node](/guides/run-nwaku-node) |
| [go-waku](https://github.com/waku-org/go-waku) | Golang-based Waku implementation to run a standalone node and access the network | [Run Go-Waku Node](https://github.com/waku-org/go-waku/tree/master/docs/operators) |
| [nwaku](https://github.com/waku-org/nwaku) | Nim-based Waku implementation to run a standalone node and access the network (recommended) | [Run a Nwaku Node](/guides/run-nwaku-node) |
| [go-waku](https://github.com/waku-org/go-waku) | Golang-based Waku implementation to run a standalone node and access the network | [Run a Go-Waku Node](https://github.com/waku-org/go-waku/tree/master/docs/operators) |
## Integrate Using SDKs
Waku is implemented in multiple SDKs, allowing it to easily integrate with different languages and address various use cases.
Waku is implemented in multiple SDKs, allowing it to integrate with different languages and address various use cases efficiently.
| SDK | Description | Documentation |
| | Description | Documentation |
| - | - | - |
| [js-waku](https://github.com/waku-org/js-waku) | JavaScript/TypeScript SDK designed for browser environments | |
| [nwaku](https://github.com/waku-org/nwaku) | Nim SDK designed for integration with native Nim applications | |
@ -30,9 +30,9 @@ Waku is implemented in multiple SDKs, allowing it to easily integrate with diffe
## Run on Mobile Devices
Waku provides integrations tailored for mobile applications, enabling Waku to operate efficiently on mobile devices.
Waku provides integrations tailored for mobile applications, enabling Waku to run efficiently on mobile devices.
| Language | Description | Documentation |
| | Description | Documentation |
| - | - | - |
| [React Native](https://github.com/waku-org/waku-react-native) | React Native wrapper using `go-waku` bindings designed for native mobile integration | |
| Swift (iOS) | `go-waku` bindings for Swift applications to seamlessly integrate Waku | |
@ -40,7 +40,7 @@ Waku provides integrations tailored for mobile applications, enabling Waku to op
## More Integrations
| Implementation | Description | Documentation |
| | Description | Documentation |
| - | - | - |
| [@waku/react](https://www.npmjs.com/package/@waku/react) | React components and UI adapters designed for seamless integration with `js-waku` | |
| [@waku/create-app](https://www.npmjs.com/package/@waku/create-app) | Starter kit to bootstrap your next `js-waku` project from various example templates | |

View File

@ -1,5 +1,5 @@
---
title: Run Nwaku Node
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.
@ -8,10 +8,77 @@ This guide provides detailed steps to build, configure, and connect a `nwaku` no
## Build the Node
## Configure the Node
Before running a Nwaku node, it is necessary to build it. Nwaku provides multiple options for building a node:
| | Description | Documentation |
| - | - | - |
| 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) |
:::info
Nwaku can be built and run on Linux and macOS, while Windows support is currently experimental.
:::
## Run the Node
Once you have built the `nwaku` node, run it using the default configuration:
```bash
# Run with default configuration
./build/wakunode2
# See available command line options
./build/wakunode2 --help
```
By default, a `nwaku` node is configured to do the following:
- Generate a new private key and libp2p identity.
- Listen for incoming libp2p connections on the default TCP port (`60000`).
- Subscribe to the default Pub/Sub topic (`/waku/2/default-waku/proto`).
- 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.
:::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.
:::
## Connect the Node
To join the Waku Network, nodes must connect with peers. Nwaku provides multiple [peer discovery](/overview/concepts/peer-discovery) mechanisms for locating other peers:
| | 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) |
:::info
You can configure a `nwaku` node to use multiple peer discovery mechanisms simultaneously.
:::
## Interact with the Node
## Monitor the Node
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
```
You will get a response similar to:
```json
{
"jsonrpc":"2.0",
"id":"id",
"result":{
"listenAddresses":[
"/ip4/0.0.0.0/tcp/60000/p2p/16Uiu2HAmLU5Nwng9dWFZwM2DgJ5QGcUuDnefJyHJiXUCVaprhgL4"
],
"enrUri":"enr:-IO4QDxToTg86pPCK2KvMeVCXC2ADVZWrxXSvNZeaoa0JhShbM5qed69RQz1s1mWEEqJ3aoklo_7EU9iIBcPMVeKlCQBgmlkgnY0iXNlY3AyNTZrMaEDdBHK1Gx6y_zv5DVw5Qb3DtSOMmVHTZO1WSORrF2loL2DdWRwgiMohXdha3UyAw"
}
}
```

View File

@ -24,7 +24,7 @@ Waku provides a set of protocols to optimize its performance in resource-limited
## Overview of Protocol Interaction
Here's a diagram illustrating the interaction between different protocols within the Waku Network.
Here is a diagram illustrating the interaction between different protocols within the Waku Network.
```mermaid
sequenceDiagram

View File

@ -12,7 +12,7 @@ Once a connection is established, the node must actively seek out additional pee
## Predefined Nodes
Waku applications have the flexibility to embed bootstrap node addresses directly into their codebase. Developers can opt to use either the [predefined nodes by Status](https://github.com/waku-org/js-waku/blob/master/packages/core/src/lib/predefined_bootstrap_nodes.ts#L45) or [operate a node](/guides/nodes-and-sdks#operate-a-waku-node) per their preference.
Waku applications have the flexibility to embed bootstrap node addresses directly into their codebase. Developers can opt to use either the [predefined nodes by Status](https://github.com/waku-org/js-waku/blob/master/packages/core/src/lib/predefined_bootstrap_nodes.ts#L45) or [run a node](/guides/nodes-and-sdks#run-a-waku-node) per their preference.
#### Pros
@ -29,7 +29,7 @@ Waku applications have the flexibility to embed bootstrap node addresses directl
Built upon the foundation of [EIP-1459: Node Discovery via DNS](https://eips.ethereum.org/EIPS/eip-1459), DNS Discovery allows the retrieval of an `ENR` tree from the `TXT` field of a domain name. This innovative approach enables the storage of essential node connection details, including IP, port, and multiaddr, using the standardized [ENR format](https://rfc.vac.dev/spec/31/).
This bootstrapping method allows anyone to register and publish a domain name for the network, fostering increased decentralization.
This bootstrapping method allows anyone to register and publish a domain name for the network, promoting increased decentralization.
#### Pros

View File

@ -10,7 +10,7 @@ Waku takes a modular approach, providing a range of protocols that enable applic
## [RLN Relay](https://rfc.vac.dev/spec/17/)
`RLN Relay` protocol extends the `Relay` protocol by using [Rate Limit Nullifiers (RLN)](https://rfc.vac.dev/spec/32/) to provide efficient and economic spam prevention. It enforces a rate limit on messages over time for all peers on the network, economically preventing spam, and imposes financial penalties and network removal for spammers. You can find more details in the [RLN Relay blog post](https://vac.dev/rln-relay).
`RLN Relay` protocol extends the `Relay` protocol by using [Rate Limit Nullifiers (RLN)](https://rfc.vac.dev/spec/32/) to provide efficient and economic spam prevention. It enforces a rate limit on messages over time for all peers in the network, economically preventing spam, and imposes financial penalties and network removal for spammers. You can find more details in the [RLN Relay blog post](https://vac.dev/rln-relay).
## [Filter](https://rfc.vac.dev/spec/12/)
@ -22,7 +22,7 @@ Waku takes a modular approach, providing a range of protocols that enable applic
## [Store](https://rfc.vac.dev/spec/13/)
`Store` protocol is responsible for storing messages relayed on the network, making it possible to query and retrieve them later. This functionality benefits offline peers by enabling them to retrieve missed messages upon reconnection.
`Store` protocol is responsible for storing messages relayed in the network, making it possible to query and retrieve them later. This functionality benefits offline peers by enabling them to retrieve missed messages upon reconnection.
:::info
Using `Relay` and `Filter` protocols is recommended when a node is online, as `Store` does not guarantee data availability. The `Store` protocol is suitable for retrieving messages when connecting to the network, like when a dApp starts.

View File

@ -41,7 +41,7 @@ Waku can cater to applications that require privacy guarantees, such as:
### Modular Design
Waku nodes are adaptive and can be customized based on the application's requirements and environment. Users can adjust several parameters, including:
Waku nodes are adaptive and can be customized based on the application's requirements and environment. Users can adjust multiple parameters, including:
- Low privacy/low resource usage vs. high privacy/increased latency + bandwidth usage.
- Providing resources to the network vs. consuming resources.
@ -52,7 +52,7 @@ These options are part of the [Anonymity Trilemma](https://eprint.iacr.org/2017/
### Service Network
Waku provides developers with a convenient solution for building decentralized communication systems, eliminating the need to build a peer-to-peer network from scratch. Node operators can offer several services, such as:
Waku provides developers with a convenient solution for building decentralized communication systems, eliminating the need to build a peer-to-peer network from scratch. Node operators can offer multiple services, such as:
- Storing messages for offline devices.
- Enabling bandwidth-saving access to the [Relay](/overview/concepts/protocols#relay) network through [Light Push](/overview/concepts/protocols#light-push) and [Filter](/overview/concepts/protocols#filter) protocols.
@ -70,4 +70,4 @@ The [Relay](/overview/concepts/protocols#relay) protocol is the foundation of th
5. Developing methods to protect against mass deanonymization (currently being researched).
6. Designing strategies to scale `Relay/GossipSub` securely.
If you want to learn more about how Waku operates, the [WAKU2 RFC](https://rfc.vac.dev/spec/10/) provides an in-depth look under the hood.
If you want to learn more about how Waku works, the [WAKU2 RFC](https://rfc.vac.dev/spec/10/) provides an in-depth look under the hood.

View File

@ -8,7 +8,7 @@ Some of the Waku's security features include the following:
## [Pseudonymity](https://rfc.vac.dev/spec/10/#pseudonymity)
Waku ensures pseudonymity across its protocol layers, using libp2p `PeerID` as identifiers instead of disclosing true identities. However, it's important to note that pseudonymity doesn't provide complete anonymity. Actions performed under the same pseudonym (`PeerID`) can be linked, leading to the potential re-identification of the actual actor.
Waku ensures pseudonymity across its protocol layers, using libp2p `PeerID` as identifiers instead of disclosing true identities. However, it is important to note that pseudonymity does not provide complete anonymity. Actions performed under the same pseudonym (`PeerID`) can be linked, leading to the potential re-identification of the actual actor.
## [Anonymity/Unlinkability](https://rfc.vac.dev/spec/10/#anonymity--unlinkability)

View File

@ -6,7 +6,7 @@ Since Waku is built on top of libp2p, they share a lot of concepts and terminolo
## Waku as a Service Network
Waku intends to incentivize mechanisms to run nodes, but it's not part of libp2p's scope. Additionally, users or developers do not have to deploy their infra as a prerequisite to use Waku. It is a service network. However, you are encouraged to [operate a node](/guides/nodes-and-sdks#operate-a-waku-node) to support and decentralize the network.
Waku intends to incentivize mechanisms to run nodes, but it is not part of libp2p's scope. Additionally, users or developers do not have to deploy their infra as a prerequisite to use Waku. It is a service network. However, you are encouraged to [run a node](/guides/nodes-and-sdks#run-a-waku-node) to support and decentralize the network.
## Waku as a Keyturn Solution

View File

@ -14,7 +14,7 @@ Waku can be used as the communication layer when building a private, decentraliz
### Polls
With Waku, you can create, answer, and view censorship-resistant polls, fostering a democratic and transparent voting environment immune to manipulation and censorship.
With Waku, you can create, answer, and view censorship-resistant polls, promoting a democratic and transparent voting environment immune to manipulation and censorship.
#### Demos

View File

@ -17,7 +17,7 @@ Waku is intended to empower individuals by returning control of communication to
| | Whisper | Waku |
| - | - | - |
| **Scalability** | Whisper doesn't scale very well, specifically when it comes to bandwidth usage on mobile devices. | Uses GossipSub and Content Topics. |
| **Scalability** | Whisper does not scale very well, specifically when it comes to bandwidth usage on mobile devices. | Uses GossipSub and Content Topics. |
| **Spam Resistance** | Proof of work requires too much battery and compute power making it a poor mechanism for heterogeneous nodes. | Uses innovative p2p economic spam protection mechanism RLN Relay. |
| **Incentivization Infrastructure** | There is no incentive to run a Whisper node. | Research in progress to design incentivization for node operators. |
| **Formal Specification/Documentation** | Lack of formal and unambiguous specification. | The specs and docs are open-source and licensed under CC0, making them freely available for anyone to read, modify and improve without restrictions. |

View File

@ -67,7 +67,7 @@ const config = {
to: "/guides/nodes-and-sdks"
},
{
label: "Run Nwaku Node",
label: "Run a Nwaku Node",
to: "guides/run-nwaku-node"
}
]
@ -118,7 +118,7 @@ const config = {
label: "Nodes and SDKs"
},
{
label: "Run Nwaku Node",
label: "Run a Nwaku Node",
to: "guides/run-nwaku-node"
}
]