feat: use DNS Discovery in the configuration (#101)

This commit is contained in:
Richard Ramos 2021-11-09 15:27:02 -04:00 committed by GitHub
parent ce2cb1a453
commit 7095b80cb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 10 deletions

View File

@ -30,11 +30,15 @@ proc getDefaultNodeConfig*(fleetConfig: FleetConfig, installationId: string): Js
result["UpstreamConfig"]["URL"] = upstreamUrl
result["ShhextConfig"]["InstallationID"] = newJString(installationId)
result["ClusterConfig"]["RelayNodes"] = %* fleetConfig.getNodes(fleet, FleetNodes.Waku)
result["ClusterConfig"]["StoreNodes"] = %* fleetConfig.getNodes(fleet, FleetNodes.Waku)
result["ClusterConfig"]["FilterNodes"] = %* fleetConfig.getNodes(fleet, FleetNodes.Waku)
result["ClusterConfig"]["LightpushNodes"] = %* fleetConfig.getNodes(fleet, FleetNodes.Waku)
result["ClusterConfig"]["WakuRendezvousNodes"] = %* @[]
result["ClusterConfig"]["RelayNodes"] = %* @["enrtree://AOFTICU2XWDULNLZGRMQS4RIZPAZEHYMV4FYHAPW563HNRAOERP7C@test.nodes.vac.dev"]
result["ClusterConfig"]["StoreNodes"] = %* @["enrtree://AOFTICU2XWDULNLZGRMQS4RIZPAZEHYMV4FYHAPW563HNRAOERP7C@test.nodes.vac.dev"]
result["ClusterConfig"]["FilterNodes"] = %* @["enrtree://AOFTICU2XWDULNLZGRMQS4RIZPAZEHYMV4FYHAPW563HNRAOERP7C@test.nodes.vac.dev"]
result["ClusterConfig"]["LightpushNodes"] = %* @["enrtree://AOFTICU2XWDULNLZGRMQS4RIZPAZEHYMV4FYHAPW563HNRAOERP7C@test.nodes.vac.dev"]
#TODO: in the meantime we're using the go-waku test fleet for rendezvous.
# once we have a prod fleet this code needs to be updated
result["ClusterConfig"]["WakuRendezvousNodes"] = %* fleetConfig.getNodes(Fleet.GoWakuTest, FleetNodes.LibP2P)
# TODO: commented since it's not necessary (we do the connections thru C bindings). Enable it thru an option once status-nodes are able to be configured in desktop
# result["ListenAddr"] = if existsEnv("STATUS_PORT"): newJString("0.0.0.0:" & $getEnv("STATUS_PORT")) else: newJString("0.0.0.0:30305")

View File

@ -213,10 +213,10 @@ proc setFleet*(fleetConfig: FleetConfig, fleet: Fleet): StatusGoError =
nodeConfig["ClusterConfig"]["TrustedMailServers"] = %* fleetConfig.getNodes(fleet, FleetNodes.Mailservers)
nodeConfig["ClusterConfig"]["StaticNodes"] = %* fleetConfig.getNodes(fleet, FleetNodes.Whisper)
nodeConfig["ClusterConfig"]["RendezvousNodes"] = %* fleetConfig.getNodes(fleet, FleetNodes.Rendezvous)
nodeConfig["ClusterConfig"]["RelayNodes"] = %* fleetConfig.getNodes(fleet, FleetNodes.Waku)
nodeConfig["ClusterConfig"]["StoreNodes"] = %* fleetConfig.getNodes(fleet, FleetNodes.Waku)
nodeConfig["ClusterConfig"]["FilterNodes"] = %* fleetConfig.getNodes(fleet, FleetNodes.Waku)
nodeConfig["ClusterConfig"]["LightpushNodes"] = %* fleetConfig.getNodes(fleet, FleetNodes.Waku)
nodeConfig["ClusterConfig"]["RelayNodes"] = %* @["enrtree://AOFTICU2XWDULNLZGRMQS4RIZPAZEHYMV4FYHAPW563HNRAOERP7C@test.nodes.vac.dev"]
nodeConfig["ClusterConfig"]["StoreNodes"] = %* @["enrtree://AOFTICU2XWDULNLZGRMQS4RIZPAZEHYMV4FYHAPW563HNRAOERP7C@test.nodes.vac.dev"]
nodeConfig["ClusterConfig"]["FilterNodes"] = %* @["enrtree://AOFTICU2XWDULNLZGRMQS4RIZPAZEHYMV4FYHAPW563HNRAOERP7C@test.nodes.vac.dev"]
nodeConfig["ClusterConfig"]["LightpushNodes"] = %* @["enrtree://AOFTICU2XWDULNLZGRMQS4RIZPAZEHYMV4FYHAPW563HNRAOERP7C@test.nodes.vac.dev"]
#TODO: in the meantime we're using the go-waku test fleet for rendezvous.
# once we have a prod fleet this code needs to be updated

2
vendor/status-go vendored

@ -1 +1 @@
Subproject commit f47229a466722943ae11c7cdcd52a7ce5d8d2239
Subproject commit d35e0a339ddfdee0e52e2f6d5859302c7ec54dc6