add guide on finding node addresses
This commit is contained in:
parent
ea000a6fb7
commit
debad68a88
|
@ -2,13 +2,11 @@
|
||||||
title: Build Nwaku from Source
|
title: Build Nwaku from Source
|
||||||
---
|
---
|
||||||
|
|
||||||
This guide provides detailed steps to build a `nwaku` node from the source 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.
|
This guide provides detailed steps to build a `nwaku` node from the source to access the latest development version or a specific commit or tag of `nwaku`. If you prefer a more stable version, [download a pre-compiled binary](https://github.com/waku-org/nwaku/tags) instead.
|
||||||
|
|
||||||
## Prerequisites
|
:::info
|
||||||
|
A minimum of 2GB of RAM is required to build `nwaku`. The build process will only succeed on systems that meet this requirement.
|
||||||
- 2GB of RAM
|
:::
|
||||||
- [Git](https://git-scm.com/) or [GitHub Desktop](https://desktop.github.com/)
|
|
||||||
- [Nim](https://nim-lang.org/install.html) installed on your system
|
|
||||||
|
|
||||||
## Install Dependencies
|
## Install Dependencies
|
||||||
|
|
||||||
|
@ -71,7 +69,7 @@ You can use `git tag -l` to check specific version tags.
|
||||||
|
|
||||||
## Build the Binary
|
## Build the Binary
|
||||||
|
|
||||||
To build the `nwaku` binary, use:
|
Build the `nwaku` binary:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make wakunode2
|
make wakunode2
|
||||||
|
@ -103,7 +101,7 @@ To learn more about running nwaku, please refer to:
|
||||||
|
|
||||||
## Run Test Suite
|
## Run Test Suite
|
||||||
|
|
||||||
To run the tests for both `Waku v1` and `Waku v2`, use:
|
Run the tests for both `Waku v1` and `Waku v2`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make test
|
make test
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
title: Node Configuration
|
title: Node Configuration
|
||||||
---
|
---
|
||||||
|
|
||||||
Nwaku can be configured using a combination of the following methods:
|
Waku nodes can be configured using a combination of the following methods:
|
||||||
|
|
||||||
1. Command line options and flags
|
1. Command line options and flags
|
||||||
2. Environment variables (recommended)
|
2. Environment variables (recommended)
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
title: Run Nwaku with Docker Compose
|
title: Run Nwaku with Docker Compose
|
||||||
---
|
---
|
||||||
|
|
||||||
`nwaku-compose` is a ready-to-use `docker-compose` setup that runs a nwaku node and monitors it with already configured [Prometheus](https://prometheus.io/) and [Grafana](https://grafana.com/) instances. This guide provides detailed steps to build, run, and monitor a `nwaku` node with [nwaku-compose](https://github.com/alrevuelta/nwaku-compose).
|
`nwaku-compose` is a ready-to-use `docker-compose` setup that runs a nwaku node and monitors it with already configured [Prometheus](https://prometheus.io/) and [Grafana](https://grafana.com/) instances.
|
||||||
|
|
||||||
|
This guide provides detailed steps to build, configure, run, and monitor a `nwaku` node with [nwaku-compose](https://github.com/alrevuelta/nwaku-compose).
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
|
@ -23,7 +25,7 @@ Modify the `docker-compose.yml` file to customize your node's configuration, inc
|
||||||
|
|
||||||
## Run Docker Compose
|
## Run Docker Compose
|
||||||
|
|
||||||
To export your public IP (`MY_EXT_IP`) and run `nwaku-compose`, use:
|
Export your public IP (`MY_EXT_IP`) and run `nwaku-compose`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
export MY_EXT_IP=$(dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | awk -F'"' '{ print $2}')
|
export MY_EXT_IP=$(dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | awk -F'"' '{ print $2}')
|
||||||
|
|
|
@ -17,13 +17,13 @@ sudo sh get-docker.sh
|
||||||
|
|
||||||
The Nwaku Docker images are available on the Docker Hub public registry under the [statusteam/nim-waku](https://hub.docker.com/r/statusteam/nim-waku) repository. Please visit [statusteam/nim-waku/tags](https://hub.docker.com/r/statusteam/nim-waku/tags) for images of specific releases.
|
The Nwaku Docker images are available on the Docker Hub public registry under the [statusteam/nim-waku](https://hub.docker.com/r/statusteam/nim-waku) repository. Please visit [statusteam/nim-waku/tags](https://hub.docker.com/r/statusteam/nim-waku/tags) for images of specific releases.
|
||||||
|
|
||||||
To pull the latest image, use:
|
Pull the latest docker image:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker pull statusteam/nim-waku
|
docker pull statusteam/nim-waku
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also build the Docker image locally using:
|
You can also build the Docker image locally:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Clone the repository
|
# Clone the repository
|
||||||
|
@ -39,7 +39,7 @@ make docker-image
|
||||||
|
|
||||||
## Run Docker Container
|
## Run Docker Container
|
||||||
|
|
||||||
To run `nwaku` in a new Docker container, use:
|
Run `nwaku` in a new Docker container:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run [OPTIONS] [IMAGE] [ARG...]
|
docker run [OPTIONS] [IMAGE] [ARG...]
|
||||||
|
@ -49,7 +49,7 @@ docker run [OPTIONS] [IMAGE] [ARG...]
|
||||||
- `IMAGE` is the image and tag you pulled from the registry or built locally
|
- `IMAGE` is the image and tag you pulled from the registry or built locally
|
||||||
- `ARG...` is the list of `nwaku` arguments for your [chosen node configuration](/guides/nwaku/configuration)
|
- `ARG...` is the list of `nwaku` arguments for your [chosen node configuration](/guides/nwaku/configuration)
|
||||||
|
|
||||||
To run `nwaku` in a Docker container using the most typical configuration, use:
|
Run `nwaku` using the most typical configuration:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -i -t -p 60000:60000 -p 9000:9000/udp statusteam/nim-waku \
|
docker run -i -t -p 60000:60000 -p 9000:9000/udp statusteam/nim-waku \
|
||||||
|
|
|
@ -4,7 +4,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 want 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.
|
This guide provides detailed steps to build, configure, and connect a `nwaku` node to the Waku Network. It also includes interacting with the node and finding its addresses.
|
||||||
|
|
||||||
:::info
|
:::info
|
||||||
Nwaku can be built and run on Linux and macOS, while Windows support is currently experimental.
|
Nwaku can be built and run on Linux and macOS, while Windows support is currently experimental.
|
||||||
|
@ -108,5 +108,59 @@ curl --location --request GET 'http://localhost:8545' \
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
:::info
|
:::info
|
||||||
The `listenAddresses` field stores the transport addresses for accepting connections, while the `enrUri` field stores the `ENR` URI for peer discovery.
|
The `listenAddresses` field stores the node's listening address(es), while the `enrUri` field stores the discoverable `ENR` URI for peer discovery.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
## Find the Node Addresses
|
||||||
|
|
||||||
|
You can find the addresses of a running node through its logs or by calling the `get_waku_v2_debug_v1_info` method of the [JSON RPC API](https://rfc.vac.dev/spec/16/).
|
||||||
|
|
||||||
|
:::tip
|
||||||
|
When starting the node, `nwaku` will display all the public listening and discovery addresses at the `INFO` log level.
|
||||||
|
:::
|
||||||
|
|
||||||
|
### Listening Address(es)
|
||||||
|
|
||||||
|
Look for the log entry that begins with `Listening on`, for example:
|
||||||
|
|
||||||
|
```txt title="Nwaku Log Output"
|
||||||
|
INF 2023-06-15 16:09:54.448+01:00 Listening on topics="waku node" tid=1623445 file=waku_node.nim:922 full=[/ip4/0.0.0.0/tcp/60000/p2p/16Uiu2HAmQCsH9V81xoqTwGuT3qwkZWbwY1TtTQwpr3DjHU2TSwMn][/ip4/0.0.0.0/tcp/8000/ws/p2p/16Uiu2HAmQCsH9V81xoqTwGuT3qwkZWbwY1TtTQwpr3DjHU2TSwMn]
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Listening TCP transport address
|
||||||
|
/ip4/0.0.0.0/tcp/60000/p2p/16Uiu2HAmQCsH9V81xoqTwGuT3qwkZWbwY1TtTQwpr3DjHU2TSwMn
|
||||||
|
|
||||||
|
# Listening websocket address
|
||||||
|
/ip4/0.0.0.0/tcp/8000/ws/p2p/16Uiu2HAmQCsH9V81xoqTwGuT3qwkZWbwY1TtTQwpr3DjHU2TSwMn
|
||||||
|
```
|
||||||
|
|
||||||
|
### Discoverable ENR Address(es)
|
||||||
|
|
||||||
|
A `nwaku` node can encode it's addressing information in an [Ethereum Node Record (ENR)](https://eips.ethereum.org/EIPS/eip-778) following the [WAKU2-ENR](https://rfc.vac.dev/spec/31/) specification, primarily for peer discovery.
|
||||||
|
|
||||||
|
#### ENR for DNS discovery
|
||||||
|
|
||||||
|
Look for the log entry that begins with `DNS: discoverable ENR`, for example:
|
||||||
|
|
||||||
|
```txt title="Nwaku Log Output"
|
||||||
|
INF 2023-06-15 16:09:54.448+01:00 DNS: discoverable ENR topics="waku node" tid=1623445 file=waku_node.nim:923 enr=enr:-Iu4QBKYj8Ovxwz4fIalxZ_1a8dOCU2WC-1LQrcBCCb4Np93f9-UuSZXn3vagJL1S3k3hwRYfOp3JSbW7_VqwtqMIeMBgmlkgnY0gmlwhAAAAACJc2VjcDI1NmsxoQOrmyV59dAzY4ZKrvrj32VOoZbLby8dCKFnXnqhIdQ0NYN0Y3CC6mCFd2FrdTIB
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# ENR the node addresses are encoded in
|
||||||
|
enr:-Iu4QBKYj8Ovxwz4fIalxZ_1a8dOCU2WC-1LQrcBCCb4Np93f9-UuSZXn3vagJL1S3k3hwRYfOp3JSbW7_VqwtqMIeMBgmlkgnY0gmlwhAAAAACJc2VjcDI1NmsxoQOrmyV59dAzY4ZKrvrj32VOoZbLby8dCKFnXnqhIdQ0NYN0Y3CC6mCFd2FrdTIB
|
||||||
|
```
|
||||||
|
|
||||||
|
#### ENR for Discv5
|
||||||
|
|
||||||
|
Look for the log entry that begins with `Discv5: discoverable ENR`, for example:
|
||||||
|
|
||||||
|
```txt title="Nwaku Log Output"
|
||||||
|
INF 2023-06-15 16:09:54.448+01:00 Discv5: discoverable ENR topics="waku node" tid=1623445 file=waku_node.nim:924 enr=enr:-IO4QDxToTg86pPCK2KvMeVCXC2ADVZWrxXSvNZeaoa0JhShbM5qed69RQz1s1mWEEqJ3aoklo_7EU9iIBcPMVeKlCQBgmlkgnY0iXNlY3AyNTZrMaEDdBHK1Gx6y_zv5DVw5Qb3DtSOMmVHTZO1WSORrF2loL2DdWRwgiMohXdha3UyAw
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# ENR the node addresses are encoded in
|
||||||
|
enr:-IO4QDxToTg86pPCK2KvMeVCXC2ADVZWrxXSvNZeaoa0JhShbM5qed69RQz1s1mWEEqJ3aoklo_7EU9iIBcPMVeKlCQBgmlkgnY0iXNlY3AyNTZrMaEDdBHK1Gx6y_zv5DVw5Qb3DtSOMmVHTZO1WSORrF2loL2DdWRwgiMohXdha3UyAw
|
||||||
|
```
|
Loading…
Reference in New Issue