diff --git a/apps/wakunode2/config.nim b/apps/wakunode2/config.nim index ca6f52468..dfd8ca175 100644 --- a/apps/wakunode2/config.nim +++ b/apps/wakunode2/config.nim @@ -36,11 +36,6 @@ type desc: "prints the version" defaultValue: false name: "version" }: bool - - agentString* {. - defaultValue: "nwaku", - desc: "Node agent string which is used as identifier in network" - name: "agent-string" .}: string nodekey* {. desc: "P2P node private key as 64 char hex string.", diff --git a/apps/wakunode2/wakunode2.nim b/apps/wakunode2/wakunode2.nim index 903ac69c4..84435585e 100644 --- a/apps/wakunode2/wakunode2.nim +++ b/apps/wakunode2/wakunode2.nim @@ -283,8 +283,7 @@ proc initNode(conf: WakuNodeConf, dnsResolver, conf.relayPeerExchange, # We send our own signed peer record when peer exchange enabled dns4DomainName, - discv5UdpPort, - some(conf.agentString) + discv5UdpPort ) except: return err("failed to create waku node instance: " & getCurrentExceptionMsg()) diff --git a/tests/v2/test_wakunode.nim b/tests/v2/test_wakunode.nim index 4cb77e817..41ede0d62 100644 --- a/tests/v2/test_wakunode.nim +++ b/tests/v2/test_wakunode.nim @@ -209,39 +209,3 @@ procSuite "WakuNode": check: node.announcedAddresses.len == 1 node.announcedAddresses.contains(expectedDns4Addr) - - - asyncTest "Agent string is set and advertised correctly": - let - # custom agent string - expectedAgentString1 = "node1-agent-string" - - # bump when updating nim-libp2p - expectedAgentString2 = "nim-libp2p/0.0.1" - let - # node with custom agent string - nodeKey1 = crypto.PrivateKey.random(Secp256k1, rng[])[] - node1 = WakuNode.new(nodeKey1, ValidIpAddress.init("0.0.0.0"), Port(60000), - agentString = some(expectedAgentString1)) - - # node with default agent string from libp2p - nodeKey2 = crypto.PrivateKey.random(Secp256k1, rng[])[] - node2 = WakuNode.new(nodeKey2, ValidIpAddress.init("0.0.0.0"), Port(60002)) - - await node1.start() - await node1.mountRelay() - - await node2.start() - await node2.mountRelay() - - await node1.connectToNodes(@[node2.switch.peerInfo.toRemotePeerInfo()]) - await node2.connectToNodes(@[node1.switch.peerInfo.toRemotePeerInfo()]) - - let node1Agent = node2.switch.peerStore[AgentBook][node1.switch.peerInfo.toRemotePeerInfo().peerId] - let node2Agent = node1.switch.peerStore[AgentBook][node2.switch.peerInfo.toRemotePeerInfo().peerId] - - check: - node1Agent == expectedAgentString1 - node2Agent == expectedAgentString2 - - await allFutures(node1.stop(), node2.stop()) \ No newline at end of file diff --git a/vendor/nim-libbacktrace/vendor/libbacktrace-upstream/libtool b/vendor/nim-libbacktrace/vendor/libbacktrace-upstream/libtool index 4a2114cd0..76d774acc 100755 --- a/vendor/nim-libbacktrace/vendor/libbacktrace-upstream/libtool +++ b/vendor/nim-libbacktrace/vendor/libbacktrace-upstream/libtool @@ -2,7 +2,7 @@ # libtool - Provide generalized library-building support services. # Generated automatically by config.status (libbacktrace) version-unused -# Libtool was configured on host fv-az74-384: +# Libtool was configured on host fv-az201-830: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, diff --git a/waku/v2/node/waku_node.nim b/waku/v2/node/waku_node.nim index dca9046eb..1c9e0c3c6 100644 --- a/waku/v2/node/waku_node.nim +++ b/waku/v2/node/waku_node.nim @@ -129,9 +129,7 @@ proc new*(T: type WakuNode, nameResolver: NameResolver = nil, sendSignedPeerRecord = false, dns4DomainName = none(string), - discv5UdpPort = none(Port), - agentString = none(string), # defaults to nim-libp2p version - ): T {.raises: [Defect, LPError, IOError, TLSStreamProtocolError].} = + discv5UdpPort = none(Port)): T {.raises: [Defect, LPError, IOError, TLSStreamProtocolError].} = ## Creates a Waku Node instance. ## Initialize addresses @@ -200,8 +198,7 @@ proc new*(T: type WakuNode, secureKeyPath = secureKey, secureCertPath = secureCert, nameResolver = nameResolver, - sendSignedPeerRecord = sendSignedPeerRecord, - agentString = agentString + sendSignedPeerRecord = sendSignedPeerRecord ) let wakuNode = WakuNode( diff --git a/waku/v2/node/wakuswitch.nim b/waku/v2/node/wakuswitch.nim index ecb7b02ee..17d78281b 100644 --- a/waku/v2/node/wakuswitch.nim +++ b/waku/v2/node/wakuswitch.nim @@ -70,9 +70,7 @@ proc newWakuSwitch*( sendSignedPeerRecord = false, wssEnabled: bool = false, secureKeyPath: string = "", - secureCertPath: string = "", - agentString = none(string), # defaults to nim-libp2p version - ): Switch + secureCertPath: string = ""): Switch {.raises: [Defect, IOError, LPError].} = var b = SwitchBuilder @@ -88,8 +86,6 @@ proc newWakuSwitch*( .withNameResolver(nameResolver) .withSignedPeerRecord(sendSignedPeerRecord) - if agentString.isSome(): - b = b.withAgentVersion(agentString.get()) if privKey.isSome(): b = b.withPrivateKey(privKey.get()) if wsAddress.isSome():