mirror of
https://github.com/logos-messaging/docs.waku.org.git
synced 2026-08-27 04:21:12 +00:00
add peer discovery guide
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
---
|
||||
title: Configure Peer Discovery
|
||||
---
|
||||
|
||||
This guide provides detailed steps to configure a `nwaku` node to locate and connect with peers in the Waku Network.
|
||||
|
||||
:::tip
|
||||
You can configure a `nwaku` node to use multiple peer discovery mechanisms simultaneously.
|
||||
:::
|
||||
|
||||
## Configure Static Peers
|
||||
|
||||
You can provide static peers to a `nwaku` node during startup using the `staticnode` configuration option. To connect to multiple peers on startup, repeat the `staticnode` option:
|
||||
|
||||
```bash
|
||||
wakunode2 \
|
||||
--staticnode:[Libp2p MULTIADDR PEER 1] \
|
||||
--staticnode:[Libp2p MULTIADDR PEER 2]
|
||||
```
|
||||
|
||||
## Configure DNS Discovery
|
||||
|
||||
To enable [DNS Discovery](/overview/concepts/dns-discovery) in a `nwaku` node, use the following configuration options:
|
||||
|
||||
- `dns-discovery`: Enables DNS Discovery on the node (disabled by default).
|
||||
- `dns-discovery-url`: URL for DNS node list in the format `enrtree://<key>@<fqdn>` where `<fqdn>` is the fully qualified domain name and `<key>` is the base32 encoding of the compressed 32-byte public key that signed the list at that location.
|
||||
- `dns-discovery-name-server` (optional): DNS name server IPs to query. You can repeat this option to provide multiple DNS name servers.
|
||||
|
||||
```
|
||||
wakunode2 \
|
||||
--dns-discovery:true \
|
||||
--dns-discovery-url:[DNS NODE LIST]
|
||||
```
|
||||
|
||||
## Configure Discv5
|
||||
|
||||
You can enable [Discv5](/overview/concepts/discv5) in a `nwaku` node using the `discv5-discovery` and `discv5-bootstrap-node` configuration options. To configure multiple bootstrap entries for the Discv5 routing table, repeat the `discv5-bootstrap-node` option:
|
||||
|
||||
```bash
|
||||
wakunode2 \
|
||||
--discv5-discovery:true \
|
||||
--discv5-bootstrap-node:[DISCV5 ENR BOOTSTRAP ENTRY 1] \
|
||||
--discv5-bootstrap-node:[DISCV5 ENR BOOTSTRAP ENTRY 2]
|
||||
```
|
||||
|
||||
:::info
|
||||
When Discv5 is enabled and used with [DNS Discovery](#configure-dns-discovery), the `nwaku` node will attempt to bootstrap the Discv5 routing table by extracting `ENRs` from peers discovered through DNS.
|
||||
:::
|
||||
@@ -92,4 +92,8 @@ The following options are available:
|
||||
--tcp-port TCP listening port. [=60000].
|
||||
|
||||
<...>
|
||||
```
|
||||
```
|
||||
|
||||
:::tip
|
||||
To explore the available node configuration options, please refer to the [Node Configuration Options](/guides/reference/node-config-options) guide.
|
||||
:::
|
||||
@@ -2,7 +2,7 @@
|
||||
title: Node Configuration Options
|
||||
---
|
||||
|
||||
Here are the node configuration options and their descriptions:
|
||||
Here are the available node configuration options, along with their default values and descriptions:
|
||||
|
||||
## Application-Level Config
|
||||
|
||||
@@ -131,7 +131,7 @@ Here are the node configuration options and their descriptions:
|
||||
| `dns-discovery-url` | | URL for DNS node list in format 'enrtree://<key\>@<fqdn\>' |
|
||||
| `dns-discovery-name-server` | `@[1.1.1.1, 1.0.0.1]` | DNS name server IPs to query. Argument may be repeated |
|
||||
|
||||
## Discovery v5 Config
|
||||
## Discv5 Config
|
||||
|
||||
| Name | Default Value | Description |
|
||||
| - | - | - |
|
||||
@@ -158,4 +158,8 @@ Here are the node configuration options and their descriptions:
|
||||
| `websocket-port` | `8000` | WebSocket listening port |
|
||||
| `websocket-secure-support` | `false` | Enable secure websocket: true\|false |
|
||||
| `websocket-secure-key-path` | | Secure websocket key path: '/path/to/key.txt' |
|
||||
| `websocket-secure-cert-path` | | Secure websocket Certificate path: '/path/to/cert.txt' |
|
||||
| `websocket-secure-cert-path` | | Secure websocket Certificate path: '/path/to/cert.txt' |
|
||||
|
||||
:::tip
|
||||
To configure your node using the provided configuration options, please refer to the [Node Configuration Methods](/guides/reference/node-config-methods) guide.
|
||||
:::
|
||||
@@ -57,9 +57,9 @@ 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 | [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) |
|
||||
| Static Peers | Configure the bootstrap nodes that `nwaku` should establish connections upon startup | [Configure Static Peers](/guides/nwaku/configure-discovery#configure-static-peers) |
|
||||
| DNS Discovery | Enable `nwaku` to locate peers to connect to using the `DNS Discovery` mechanism | [Configure DNS Discovery](/guides/nwaku/configure-discovery#configure-dns-discovery) |
|
||||
| Discv5 | Enable `nwaku` to locate peers to connect to using the `Discv5` mechanism | [Configure Discv5](/guides/nwaku/configure-discovery#configure-discv5) |
|
||||
|
||||
:::tip
|
||||
You can configure a `nwaku` node to use multiple peer discovery mechanisms simultaneously.
|
||||
|
||||
Reference in New Issue
Block a user