diff --git a/nimbus/rpc/waku.nim b/nimbus/rpc/waku.nim index c21b32517..b07506510 100644 --- a/nimbus/rpc/waku.nim +++ b/nimbus/rpc/waku.nim @@ -268,10 +268,10 @@ proc setupWakuRPC*(node: EthereumNode, keys: KeyStorage, rpcsrv: RpcServer) = # there to have a full node no matter what message filters. # Could also be moved to waku_protocol.nim let config = node.protocolState(Waku).config - if config.wakuMode == WakuChan: + if config.topics.isSome(): try: # TODO: an addTopics call would probably be more useful - let result = await node.setTopics(config.topics.concat(filter.topics)) + let result = await node.setTopics(config.topics.get().concat(filter.topics)) if not result: raise newException(ValueError, "Too many topics") except CatchableError: diff --git a/vendor/nim-eth b/vendor/nim-eth index 3ee5651b7..b89874f6c 160000 --- a/vendor/nim-eth +++ b/vendor/nim-eth @@ -1 +1 @@ -Subproject commit 3ee5651b7c1b967e9aa115d99125ed35ac3ab2f1 +Subproject commit b89874f6cc35f2506de5d97c9a50978c77e0048f diff --git a/vendor/nim-nat-traversal b/vendor/nim-nat-traversal index bfc48eda5..2403c3392 160000 --- a/vendor/nim-nat-traversal +++ b/vendor/nim-nat-traversal @@ -1 +1 @@ -Subproject commit bfc48eda54a35b7c19cbb2994470655ad7a3bdd1 +Subproject commit 2403c33929c74f2d150f50dc8bc3a598af70661a diff --git a/vendor/nim-stew b/vendor/nim-stew index 1c4293b3e..50562b515 160000 --- a/vendor/nim-stew +++ b/vendor/nim-stew @@ -1 +1 @@ -Subproject commit 1c4293b3e754b5ea68a188b60b192801162cd44e +Subproject commit 50562b515a771cfc443557ee8e2dceee59207d52 diff --git a/waku/config.nim b/waku/config.nim index a4f01623b..3c8262bbd 100644 --- a/waku/config.nim +++ b/waku/config.nim @@ -72,10 +72,10 @@ type defaultValue: false name: "light-node" }: bool - wakuMode* {. - desc: "Select the Waku mode.", - defaultValue: WakuSan - name: "waku-mode" }: WakuMode + wakuTopicInterest* {. + desc: "Run as node with a topic-interest", + defaultValue: false + name: "waku-topic-interest" }: bool wakuPow* {. desc: "PoW requirement of Waku node.", diff --git a/waku/start_network.nim b/waku/start_network.nim index fa7d40c1c..6bdb929a3 100644 --- a/waku/start_network.nim +++ b/waku/start_network.nim @@ -10,9 +10,8 @@ const type NodeType = enum - FullNode = "--waku-mode:WakuSan", + FullNode = "", LightNode = "--light-node:on", - WakuNode = "--light-node:on --waku-mode:WakuChan" Topology = enum Star, @@ -43,8 +42,8 @@ type label: string proc initNodeCmd(nodeType: NodeType, shift: int, staticNodes: seq[string] = @[], - discovery = false, bootNodes: seq[string] = @[], master = false, - label: string): NodeInfo = + discovery = false, bootNodes: seq[string] = @[], topicInterest = false, + master = false, label: string): NodeInfo = let keypair = newKeyPair() address = Address(ip: parseIpAddress("127.0.0.1"), @@ -53,6 +52,7 @@ proc initNodeCmd(nodeType: NodeType, shift: int, staticNodes: seq[string] = @[], result.cmd = wakuNodeBin & " " & defaults & " " result.cmd &= $nodeType & " " + result.cmd &= "--waku-topic-interest:" & $topicInterest & " " result.cmd &= "--nodekey:" & $keypair.seckey & " " result.cmd &= "--ports-shift:" & $shift & " " if discovery: @@ -116,6 +116,8 @@ proc generatePrometheusConfig(nodes: seq[NodeInfo], outputFile: string) = node: '{count}'""" count += 1 + var (path, file) = splitPath(outputFile) + createDir(path) writeFile(outputFile, config) proc proccessGrafanaDashboard(nodes: int, inputFile: string, @@ -167,8 +169,9 @@ when isMainModule: for i in 0..