mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-03 22:43:09 +00:00
fix: Completely clean dns-discovery-name-server references (#3477)
This commit is contained in:
parent
08273ef0fe
commit
888b2234c5
@ -428,7 +428,7 @@ proc processInput(rfd: AsyncFD, rng: ref HmacDrbgContext) {.async.} =
|
||||
|
||||
if dnsDiscoveryUrl.isSome:
|
||||
var nameServers: seq[TransportAddress]
|
||||
for ip in conf.dnsDiscoveryNameServers:
|
||||
for ip in conf.dnsAddrsNameServers:
|
||||
nameServers.add(initTAddress(ip, Port(53))) # Assume all servers use port 53
|
||||
|
||||
let dnsResolver = DnsResolver.new(nameServers)
|
||||
|
||||
@ -170,10 +170,11 @@ type
|
||||
name: "dns-discovery-url"
|
||||
.}: string
|
||||
|
||||
dnsDiscoveryNameServers* {.
|
||||
desc: "DNS name server IPs to query. Argument may be repeated.",
|
||||
dnsAddrsNameServers* {.
|
||||
desc:
|
||||
"DNS name server IPs to query for DNS multiaddrs resolution. Argument may be repeated.",
|
||||
defaultValue: @[parseIpAddress("1.1.1.1"), parseIpAddress("1.0.0.1")],
|
||||
name: "dns-discovery-name-server"
|
||||
name: "dns-addrs-name-server"
|
||||
.}: seq[IpAddress]
|
||||
|
||||
## Chat2 configuration
|
||||
|
||||
@ -354,7 +354,7 @@ proc crawlNetwork(
|
||||
await sleepAsync(crawlInterval.millis - elapsed.millis)
|
||||
|
||||
proc retrieveDynamicBootstrapNodes(
|
||||
dnsDiscoveryUrl: string, dnsDiscoveryNameServers: seq[IpAddress]
|
||||
dnsDiscoveryUrl: string, dnsAddrsNameServers: seq[IpAddress]
|
||||
): Future[Result[seq[RemotePeerInfo], string]] {.async.} =
|
||||
## Retrieve dynamic bootstrap nodes (DNS discovery)
|
||||
|
||||
@ -363,7 +363,7 @@ proc retrieveDynamicBootstrapNodes(
|
||||
debug "Discovering nodes using Waku DNS discovery", url = dnsDiscoveryUrl
|
||||
|
||||
var nameServers: seq[TransportAddress]
|
||||
for ip in dnsDiscoveryNameServers:
|
||||
for ip in dnsAddrsNameServers:
|
||||
nameServers.add(initTAddress(ip, Port(53))) # Assume all servers use port 53
|
||||
|
||||
let dnsResolver = DnsResolver.new(nameServers)
|
||||
|
||||
@ -9,7 +9,6 @@ The following command line options are available:
|
||||
```
|
||||
--dns-discovery Enable DNS Discovery
|
||||
--dns-discovery-url URL for DNS node list in format 'enrtree://<key>@<fqdn>'
|
||||
--dns-discovery-name-server DNS name server IPs to query. Argument may be repeated.
|
||||
```
|
||||
|
||||
- `--dns-discovery` is used to enable DNS discovery on the node.
|
||||
@ -17,8 +16,6 @@ Waku DNS discovery is disabled by default.
|
||||
- `--dns-discovery-url` is mandatory if DNS discovery is enabled.
|
||||
It contains the URL for the node list.
|
||||
The URL must be 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` is optional and contains the IP(s) of the DNS name servers to query.
|
||||
If left unspecified, the Cloudflare servers `1.1.1.1` and `1.0.0.1` will be used by default.
|
||||
|
||||
A node will attempt connection to all discovered nodes.
|
||||
|
||||
|
||||
@ -33,12 +33,10 @@ The following command line options are available for both `wakunode2` or `chat2`
|
||||
```
|
||||
--dns-discovery Enable DNS Discovery
|
||||
--dns-discovery-url URL for DNS node list in format 'enrtree://<key>@<fqdn>'
|
||||
--dns-discovery-name-server DNS name server IPs to query. Argument may be repeated.
|
||||
```
|
||||
|
||||
- `--dns-discovery` is used to enable DNS discovery on the node. Waku DNS discovery is disabled by default.
|
||||
- `--dns-discovery-url` is mandatory if DNS discovery is enabled. It contains the URL for the node list. The URL must be 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. See [EIP-1459](https://eips.ethereum.org/EIPS/eip-1459#specification) or the example below to illustrate.
|
||||
- `--dns-discovery-name-server` is optional and contains the IP(s) of the DNS name servers to query. If left unspecified, the Cloudflare servers `1.1.1.1` and `1.0.0.1` will be used by default.
|
||||
|
||||
A node will attempt connection to all discovered nodes.
|
||||
|
||||
@ -63,9 +61,9 @@ Similarly, for `chat2`:
|
||||
|
||||
The node will discover and attempt connection to all `waku.test` nodes during setup procedures.
|
||||
|
||||
To use specific DNS name servers, one or more `--dns-discovery-name-server` arguments can be added:
|
||||
To use specific DNS name servers, one or more `--dns-addrs-name-server` arguments can be added:
|
||||
|
||||
```
|
||||
./build/wakunode2 --dns-discovery:true --dns-discovery-url:enrtree://AOGYWMBYOUIMOENHXCHILPKY3ZRFEULMFI4DOM442QSZ73TT2A7VI@test.waku.nodes.status.im --dns-dis
|
||||
covery-name-server:8.8.8.8 --dns-discovery-name-server:8.8.4.4
|
||||
covery-name-server:8.8.8.8 --dns-addrs-name-server:8.8.4.4
|
||||
```
|
||||
|
||||
@ -179,7 +179,7 @@ The following command line options are available:
|
||||
```
|
||||
--dns-discovery Enable DNS Discovery
|
||||
--dns-discovery-url URL for DNS node list in format 'enrtree://<key>@<fqdn>'
|
||||
--dns-discovery-name-server DNS name server IPs to query. Argument may be repeated.
|
||||
--dns-addrs-name-server DNS name server IPs to query. Argument may be repeated.
|
||||
```
|
||||
|
||||
- `--dns-discovery` is used to enable DNS discovery on the node.
|
||||
@ -187,8 +187,6 @@ Waku DNS discovery is disabled by default.
|
||||
- `--dns-discovery-url` is mandatory if DNS discovery is enabled.
|
||||
It contains the URL for the node list.
|
||||
The URL must be 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` is optional and contains the IP(s) of the DNS name servers to query.
|
||||
If left unspecified, the Cloudflare servers `1.1.1.1` and `1.0.0.1` will be used by default.
|
||||
|
||||
A node will attempt connection to all discovered nodes.
|
||||
|
||||
|
||||
@ -97,7 +97,7 @@ proc init*(
|
||||
return ok(wakuDnsDisc)
|
||||
|
||||
proc retrieveDynamicBootstrapNodes*(
|
||||
dnsDiscoveryUrl: string, dnsDiscoveryNameServers: seq[IpAddress]
|
||||
dnsDiscoveryUrl: string, dnsAddrsNameServers: seq[IpAddress]
|
||||
): Future[Result[seq[RemotePeerInfo], string]] {.async.} =
|
||||
## Retrieve dynamic bootstrap nodes (DNS discovery)
|
||||
|
||||
@ -106,7 +106,7 @@ proc retrieveDynamicBootstrapNodes*(
|
||||
debug "Discovering nodes using Waku DNS discovery", url = dnsDiscoveryUrl
|
||||
|
||||
var nameServers: seq[TransportAddress]
|
||||
for ip in dnsDiscoveryNameServers:
|
||||
for ip in dnsAddrsNameServers:
|
||||
nameServers.add(initTAddress(ip, Port(53))) # Assume all servers use port 53
|
||||
|
||||
let dnsResolver = DnsResolver.new(nameServers)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user