diff --git a/.cspell.json b/.cspell.json index 016b8ac..ac06451 100644 --- a/.cspell.json +++ b/.cspell.json @@ -41,7 +41,8 @@ "Thorén", "wakunode", "autoplay", - "classwide" + "classwide", + "devel" ], "flagWords": [], "ignorePaths": [ diff --git a/docs/guides/nwaku/build-from-source.md b/docs/guides/nwaku/build-from-source.md new file mode 100644 index 0000000..ca23f0a --- /dev/null +++ b/docs/guides/nwaku/build-from-source.md @@ -0,0 +1,107 @@ +--- +title: Build Nwaku from Source +--- + +Nwaku offers the option of building a node from the source when you want to access the latest development version or a specific commit of nwaku. If you prefer a more stable version, [download a pre-compiled binary](https://github.com/waku-org/nwaku/tags) instead. + +:::info +Nwaku can be built and run on Linux and macOS, while Windows support is currently experimental. +::: + +## Prerequisites + +- 2GB of RAM +- [Git](https://git-scm.com/) or [GitHub Desktop](https://desktop.github.com/) +- [Nim](https://nim-lang.org/) installed on your system + +## Install Dependencies + +#### Linux + +To install the dependencies on common Linux distributions, run the following: + +```mdx-code-block +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +``` + + + + +```bash +sudo apt-get install build-essential git +``` + + + + +```bash +dnf install @development-tools +``` + + + + +```bash +# using your favorite AUR helper +yourAURhelper -S base-devel +``` + + + + +#### macOS + +If you use [Homebrew](https://brew.sh/) to manage packages, run the following: + +```bash +brew install cmake +``` + +## Clone the Repository + +Get the source code from the GitHub repository. The default branch is `master`, the release candidate for major updates. + +```bash +git clone https://github.com/waku-org/nwaku +cd nwaku +``` +:::info +You can use `git tag -l` to check specific version tags. +::: + +## Build the Binary + +To build the nwaku binary, run the following: + +```bash +make wakunode2 +``` + +The first `make` invocation updates all Git submodules. After each `git pull`, run `make update` to keep the submodules updated in the future. + +```bash +make update wakunode2 +``` + +## Run the Binary + +Nwaku will create the `wakunode2` binary in the `./build/` directory. + +```bash +./build/wakunode2 +``` + +To learn more about running nwaku, please refer to: + +- [Run a Nwaku Node](/guides/run-nwaku-node#run-the-node) +- [Run Nwaku in Docker Container](https://github.com/waku-org/nwaku/blob/master/docs/operators/docker-quickstart.md) +- [Run Nwaku on DigitalOcean Droplet](https://github.com/waku-org/nwaku/blob/master/docs/operators/droplet-quickstart.md) + +## Run Test Suite + +To run the tests for both `Waku v1` and `Waku v2`, run the following: + +```bash +make test +``` \ No newline at end of file diff --git a/docs/guides/run-nwaku-node.md b/docs/guides/run-nwaku-node.md index be47a40..8bd1ae7 100644 --- a/docs/guides/run-nwaku-node.md +++ b/docs/guides/run-nwaku-node.md @@ -8,11 +8,11 @@ This guide provides detailed steps to build, configure, and connect a `nwaku` no ## Build the Node -Before running a Nwaku node, it is necessary to build it. Nwaku provides multiple options for building a 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) | +| Source Code | Build a `nwaku` node directly from the source code | [Build Nwaku from Source](/guides/nwaku/build-from-source) | | 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 | [Run Nwaku in Docker Container](https://github.com/waku-org/nwaku/blob/master/docs/operators/docker-quickstart.md) | diff --git a/docs/overview/concepts/discv5.md b/docs/overview/concepts/discv5.md index d1b4a17..ff2bf17 100644 --- a/docs/overview/concepts/discv5.md +++ b/docs/overview/concepts/discv5.md @@ -4,12 +4,12 @@ title: Discv5 `Discv5` is a decentralized and efficient peer discovery mechanism for the Waku Network. It uses a [Distributed Hash Table (DHT)](https://en.wikipedia.org/wiki/Distributed_hash_table) for storing `ENR` records, providing resistance to censorship. `Discv5` offers a global view of participating nodes, enabling random sampling for load distribution. It uses bootstrap nodes as an entry point to the network, providing randomized sets of nodes for mesh expansion. Please refer to the [Discv5](https://rfc.vac.dev/spec/33/) specification to learn more. -## Pros +#### Pros - Decentralized with random sampling from a global view. - Continuously researched and improved. -## Cons +#### Cons - Requires lots of connections and involves frequent churn. - Relies on User Datagram Protocol (UDP), which is not supported in web browsers. diff --git a/docs/overview/concepts/dns-discovery.md b/docs/overview/concepts/dns-discovery.md index 03a4a2a..2800633 100644 --- a/docs/overview/concepts/dns-discovery.md +++ b/docs/overview/concepts/dns-discovery.md @@ -6,13 +6,13 @@ Built upon the foundation of [EIP-1459: Node Discovery via DNS](https://eips.eth This bootstrapping method allows anyone to register and publish a domain name for the network, promoting increased decentralization. -## Pros +#### Pros - Low latency, low resource requirements. - Easy bootstrap list updates by modifying the domain name, eliminating the need for code changes. - Ability to reference a larger list of nodes by including other domain names in the code or ENR tree. -## Cons +#### Cons - Vulnerable to censorship: Domain names can be blocked or restricted. - Limited scalability: The listed nodes are at risk of being overwhelmed by receiving all queries. Also, operators must provide their `ENR` to the domain owner for listing. diff --git a/docs/overview/concepts/peer-exchange.md b/docs/overview/concepts/peer-exchange.md index 9951f3c..7b3b51c 100644 --- a/docs/overview/concepts/peer-exchange.md +++ b/docs/overview/concepts/peer-exchange.md @@ -4,12 +4,12 @@ title: Peer Exchange The primary objective of this protocol is to facilitate peer connectivity for resource-limited devices. The peer exchange protocol enables lightweight nodes to request peers from other nodes within the network. Light nodes can bootstrap and expand their mesh independently without relying on `Discv5`. Please refer to the [Peer Exchange](https://rfc.vac.dev/spec/34/) specification to learn more. -## Pros +#### Pros - Low resource requirements. - Decentralized with random sampling of nodes from a global view using `Discv5`. -## Cons +#### Cons - Decreased anonymity. - Imposes additional load on responder nodes. diff --git a/docs/overview/concepts/predefined-nodes.md b/docs/overview/concepts/predefined-nodes.md index 040a987..0a3a473 100644 --- a/docs/overview/concepts/predefined-nodes.md +++ b/docs/overview/concepts/predefined-nodes.md @@ -4,12 +4,12 @@ title: Predefined Nodes Waku applications have the flexibility to embed bootstrap node addresses directly into their codebase. Developers can 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 +#### Pros - Low latency. - Low resource requirements. -## Cons +#### Cons - Vulnerable to censorship: Node IPs can be blocked or restricted. - Limited scalability: The number of nodes is fixed and cannot easily be expanded. diff --git a/docs/overview/index.md b/docs/overview/index.md index 8a8725b..7b5d9ec 100644 --- a/docs/overview/index.md +++ b/docs/overview/index.md @@ -15,7 +15,7 @@ Waku protocols ensure that users communication remains censorship-resistant and The Waku family of protocols is designed for diverse applications due to their properties, such as: -### Generalized Messaging +### Generalized Waku aims to solve the problem of ephemeral messaging between subsystems and nodes through a flexible, secure, and private protocol. It supports human-to-human and machine-to-machine messaging scenarios but is not designed for data storage. diff --git a/sidebars.js b/sidebars.js index 47913a8..3e26b61 100644 --- a/sidebars.js +++ b/sidebars.js @@ -53,7 +53,17 @@ const sidebars = { ], guides: [ "guides/nodes-and-sdks", - "guides/run-nwaku-node", + { + type: "category", + label: "Run a Nwaku Node", + link: { + type: "doc", + id: "guides/run-nwaku-node", + }, + items: [ + "guides/nwaku/build-from-source", + ] + }, ], community: [ "powered-by-waku",