diff --git a/src/app_service/common/network_constants.nim b/src/app_service/common/network_constants.nim index e55ca9a48f..6149106d86 100644 --- a/src/app_service/common/network_constants.nim +++ b/src/app_service/common/network_constants.nim @@ -175,6 +175,10 @@ var NODE_CONFIG* = %* { "Port": 0, "LightClient": false, "PersistPeers": true, + "EnableDiscV5": true, + "UDPPort": 0, + "PeerExchange": true, + "AutoUpdate": true, }, "WalletConfig": { "Enabled": true, diff --git a/src/app_service/service/accounts/service.nim b/src/app_service/service/accounts/service.nim index 51758929c7..f092158768 100644 --- a/src/app_service/service/accounts/service.nim +++ b/src/app_service/service/accounts/service.nim @@ -236,6 +236,7 @@ proc getDefaultNodeConfig*(self: Service, installationId: string): JsonNode = result["ClusterConfig"]["TrustedMailServers"] = %* self.fleetConfiguration.getNodes(fleet, FleetNodes.Mailservers) result["ClusterConfig"]["StaticNodes"] = %* self.fleetConfiguration.getNodes(fleet, FleetNodes.Whisper) result["ClusterConfig"]["RendezvousNodes"] = %* self.fleetConfiguration.getNodes(fleet, FleetNodes.Rendezvous) + result["ClusterConfig"]["DiscV5BootstrapNodes"] = %* (@[]) # TODO: set default status.prod enr result["NetworkId"] = networkConfig["config"]["NetworkId"] result["DataDir"] = newDataDir.newJString() result["UpstreamConfig"]["Enabled"] = networkConfig["config"]["UpstreamConfig"]["Enabled"] diff --git a/src/app_service/service/node_configuration/dto/node_config.nim b/src/app_service/service/node_configuration/dto/node_config.nim index a40e5cfc8a..0073724bbc 100644 --- a/src/app_service/service/node_configuration/dto/node_config.nim +++ b/src/app_service/service/node_configuration/dto/node_config.nim @@ -46,6 +46,8 @@ type FilterNodes*: seq[string] LightpushNodes*: seq[string] WakuRendezvousNodes*: seq[string] + DiscV5BootstrapNodes*: seq[string] + LightEthConfig* = object Enabled*: bool @@ -294,6 +296,12 @@ proc toClusterConfig*(jsonObj: JsonNode): ClusterConfig = for valueObj in arr: result.WakuRendezvousNodes.add(valueObj.getStr) + if(jsonObj.getProp("DiscV5BootstrapNodes", arr)): + if(arr.kind == JArray): + for valueObj in arr: + result.DiscV5BootstrapNodes.add(valueObj.getStr) + + proc toLightEthConfig*(jsonObj: JsonNode): LightEthConfig = discard jsonObj.getProp("Enabled", result.Enabled) discard jsonObj.getProp("DatabaseCache", result.DatabaseCache) diff --git a/src/app_service/service/node_configuration/service.nim b/src/app_service/service/node_configuration/service.nim index 0b40e42104..67a35079fc 100644 --- a/src/app_service/service/node_configuration/service.nim +++ b/src/app_service/service/node_configuration/service.nim @@ -97,6 +97,7 @@ proc setWakuVersion*(self: Service, wakuVersion: int): bool = elif wakuVersion == WAKU_VERSION_2: newConfiguration.NoDiscovery = true newConfiguration.Rendezvous = false + newConfiguration.WakuV2Config.EnableDiscV5 = true newConfiguration.WakuV2Config.DiscoveryLimit = 20 newConfiguration.WakuV2Config.Rendezvous = true return self.saveConfiguration(newConfiguration) @@ -187,6 +188,20 @@ proc setFleet*(self: Service, fleet: string): bool = else: discard + if fleetType == Fleet.StatusTest: + newConfiguration.ClusterConfig.DiscV5BootstrapNodes = @[ + "enr:-JK4QM2ylZVUhVPqXrqhWWi38V46bF2XZXPSHh_D7f2PmUHbIw-4DidCBnBnm-IbxtjXOFbdMMgpHUv4dYVH6TgnkucBgmlkgnY0gmlwhCJ6_HaJc2VjcDI1NmsxoQM06FsT6EJ57mzR_wiLu2Bz1dER2nUFSCpaXzCccQtnhYN0Y3CCdl-DdWRwgiMohXdha3UyDw", + "enr:-JK4QAi2yenhIbflVpUtkLDAM7yR5qeinZSQ_TNxfAWxdffkQWlstXyspEUlapiLl-S_MTPyp5V1uiV14ATjcVU_iLoBgmlkgnY0gmlwhC_y6SSJc2VjcDI1NmsxoQJkb7I6j5X1-zjieMeBdxgDqQWuMuDUEqDR419lyKNZb4N0Y3CCdl-DdWRwgiMohXdha3UyDw", + "enr:-JK4QIGyJyjSlponBZqe9XZ75b5ePSU9fWw5UtxEF1vsYXTLYkTa4psnUxJPmOcJGVt9XCYpC2h2kNoowl1t5KzuW6wBgmlkgnY0gmlwhEDhUe2Jc2VjcDI1NmsxoQIE3HkSvDkl2zD64j2kGMH9XZHpuu-5VYT4wnBgJApW_oN0Y3CCdl-DdWRwgiMohXdha3UyDw" + ] + + if fleetType == Fleet.StatusProd: + newConfiguration.ClusterConfig.DiscV5BootstrapNodes = @[ + "enr:-JK4QM_67uA3pGij4m6J0Bka7-Hzb7HdHXVfopgOD8HAMvD_YlPz9nJ9WLsXJMsG8naD8cRwpzx56bojkwKnX24-UwMBgmlkgnY0gmlwhCPKN5mJc2VjcDI1NmsxoQIaKnT5AGTbzUbsxHnAxsJ7eVGxffKsDNej2RtyZlupFIN0Y3CCdl-DdWRwgiMohXdha3UyDw", + "enr:-JK4QHlrYkod8u0NYpBV_1iVCeiU6jVn80UJtbbyOMuO5gkIUGmfSxfMjNrcxkApxHGGiVDizs_6_SzoOAxS6zMxg7YBgmlkgnY0gmlwhCKE1emJc2VjcDI1NmsxoQMLQEj6Ys-Rqt87hblheDE74kFYqYtx2kBsrRfuMH23b4N0Y3CCdl-DdWRwgiMohXdha3UyDw", + "enr:-JK4QF8RVwcRLTV0hfSwvpZECy1j8YKu7uy8z7X82qoQC_5LbdTkfRdPiuCgdjydbR3Bti6rvG4hqGtwSlIWDVZDadcBgmlkgnY0gmlwhC_zgIaJc2VjcDI1NmsxoQMxOGCAazyuaE__TL2BHoIJmg3dtOYlODZ9TAIVOcamOYN0Y3CCdl-DdWRwgiMohXdha3UyDw" + ] + # Disabling go-waku rendezvous # newConfiguration.ClusterConfig.WakuRendezvousNodes = self.fleetConfiguration.getNodes(Fleet.GoWakuTest, FleetNodes.LibP2P) diff --git a/vendor/status-go b/vendor/status-go index c342c8bb1a..de949efcf4 160000 --- a/vendor/status-go +++ b/vendor/status-go @@ -1 +1 @@ -Subproject commit c342c8bb1af9183795f652a41065244c0a0bbe09 +Subproject commit de949efcf44df0135fa250bb16c0a0acd50ccb68