diff --git a/docs/tutorial/dingpu.md b/docs/tutorial/dingpu.md index 3731b8dbf..ecfbdb162 100644 --- a/docs/tutorial/dingpu.md +++ b/docs/tutorial/dingpu.md @@ -32,10 +32,10 @@ To just run a node and not interact on the chat it is enough to run `wakunode2`: ./build/wakunode2 --staticnode: ``` -You can also run the `wakubridge` process, which currently runs both a Waku v1 -and Waku v2 node. Currently, it has the same effect as running a `wakunode` and -`wakunode2` process separately, but bridging functionality will be added later -to this application. +You can also run the `wakubridge` process, which runs both a Waku v1 and Waku v2 +node. Currently, it has the same effect as running a `wakunode` and `wakunode2` +process separately, but bridging functionality will be added later to this +application. ``` ./build/wakubridge --staticnodev2: --fleetv1:test diff --git a/examples/v2/basic2.nim b/examples/v2/basic2.nim index a17aa892c..50872f6b8 100644 --- a/examples/v2/basic2.nim +++ b/examples/v2/basic2.nim @@ -21,7 +21,7 @@ proc runBackground() {.async.} = (extIp, extTcpPort, extUdpPort) = setupNat(conf.nat, clientId, Port(uint16(conf.tcpPort) + conf.portsShift), Port(uint16(conf.udpPort) + conf.portsShift)) - node = WakuNode.init(conf.nodeKey, conf.libp2pAddress, + node = WakuNode.init(conf.nodeKey, conf.listenAddress, Port(uint16(conf.tcpPort) + conf.portsShift), extIp, extTcpPort) await node.start() diff --git a/examples/v2/chat2.nim b/examples/v2/chat2.nim index d1a1ab785..70bb866f2 100644 --- a/examples/v2/chat2.nim +++ b/examples/v2/chat2.nim @@ -153,7 +153,7 @@ proc processInput(rfd: AsyncFD, rng: ref BrHmacDrbgContext) {.async.} = (extIp, extTcpPort, extUdpPort) = setupNat(conf.nat, clientId, Port(uint16(conf.tcpPort) + conf.portsShift), Port(uint16(conf.udpPort) + conf.portsShift)) - node = WakuNode.init(conf.nodeKey, conf.libp2pAddress, + node = WakuNode.init(conf.nodeKey, conf.listenAddress, Port(uint16(conf.tcpPort) + conf.portsShift), extIp, extTcpPort) # waitFor vs await diff --git a/waku/node/v2/config.nim b/waku/node/v2/config.nim index 7cee8fab2..4f8ee848d 100644 --- a/waku/node/v2/config.nim +++ b/waku/node/v2/config.nim @@ -8,19 +8,13 @@ import eth/keys type - Fleet* = enum - none - prod - staging - test - WakuNodeConf* = object logLevel* {. desc: "Sets the log level." defaultValue: LogLevel.INFO name: "log-level" }: LogLevel - libp2pAddress* {. + listenAddress* {. defaultValue: defaultListenAddress(config) desc: "Listening address for the LibP2P traffic." name: "listen-address"}: ValidIpAddress @@ -45,25 +39,6 @@ type "Must be one of: any, none, upnp, pmp, extip:." defaultValue: "any" }: string - discovery* {. - desc: "Enable/disable discovery v4." - defaultValue: true - name: "discovery" }: bool - - noListen* {. - desc: "Disable listening for incoming peers." - defaultValue: false - name: "no-listen" }: bool - - fleet* {. - desc: "Select the fleet to connect to." - defaultValue: Fleet.none - name: "fleet" }: Fleet - - bootnodes* {. - desc: "Enode URL to bootstrap P2P discovery with. Argument may be repeated." - name: "bootnode" }: seq[string] - staticnodes* {. desc: "Enode URL to directly connect with. Argument may be repeated." name: "staticnode" }: seq[string] @@ -93,42 +68,16 @@ type defaultValue: "" name: "filternode" }: string - whisper* {. - desc: "Enable the Whisper protocol." - defaultValue: false - name: "whisper" }: bool - - whisperBridge* {. - desc: "Enable the Whisper protocol and bridge with Waku protocol." - defaultValue: false - name: "whisper-bridge" }: bool - - lightNode* {. - desc: "Run as light node (no message relay).", - defaultValue: false - name: "light-node" }: bool - - wakuTopicInterest* {. - desc: "Run as node with a topic-interest", - defaultValue: false - name: "waku-topic-interest" }: bool - - wakuPow* {. - desc: "PoW requirement of Waku node.", - defaultValue: 0.002 - name: "waku-pow" }: float64 + topics* {. + desc: "Default topics to subscribe to (space seperated list)." + defaultValue: "waku" + name: "topics" .}: string # NOTE: Signature is different here, we return PrivateKey and not KeyPair nodekey* {. desc: "P2P node private key as hex.", defaultValue: crypto.PrivateKey.random(Secp256k1, keys.newRng()[]).tryGet() name: "nodekey" }: crypto.PrivateKey - # TODO: Add nodekey file option - - bootnodeOnly* {. - desc: "Run only as discovery bootnode." - defaultValue: false - name: "bootnode-only" }: bool rpc* {. desc: "Enable Waku RPC server.", @@ -164,15 +113,6 @@ type desc: "Enable metrics logging." defaultValue: false name: "log-metrics" }: bool - - topics* {. - desc: "Default topics to subscribe to (space seperated list)." - defaultValue: "waku" - name: "topics" .}: string - - # TODO: - # - discv5 + topic register - # - mailserver functionality # NOTE: Keys are different in nim-libp2p proc parseCmdArg*(T: type crypto.PrivateKey, p: TaintedString): T = diff --git a/waku/node/v2/wakunode2.nim b/waku/node/v2/wakunode2.nim index 29387c833..78f6d7474 100644 --- a/waku/node/v2/wakunode2.nim +++ b/waku/node/v2/wakunode2.nim @@ -324,7 +324,7 @@ when isMainModule: (extIp, extTcpPort, extUdpPort) = setupNat(conf.nat, clientId, Port(uint16(conf.tcpPort) + conf.portsShift), Port(uint16(conf.udpPort) + conf.portsShift)) - node = WakuNode.init(conf.nodeKey, conf.libp2pAddress, + node = WakuNode.init(conf.nodeKey, conf.listenAddress, Port(uint16(conf.tcpPort) + conf.portsShift), extIp, extTcpPort) waitFor node.start()