Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: switch wakuv2 fleet to waku #14033

Merged
merged 2 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 59 additions & 93 deletions fleets.json

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions libs/Onboarding/src/Onboarding/Common/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ namespace Status::Constants
namespace Fleet
{
inline const auto Prod = u"eth.prod"_qs;
inline const auto Staging = u"eth.staging"_qs;
inline const auto WakuV2Prod = u"wakuv2.prod"_qs;
inline const auto WakuV2Test = u"wakuv2.test"_qs;
inline const auto WakuSandbox = u"waku.sandbox"_qs;
inline const auto WakuTest = u"waku.test"_qs;
} // namespace Fleet

namespace FleetNodes
Expand Down
22 changes: 0 additions & 22 deletions resources/fleets_cpp.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,28 +55,6 @@
"node-08.gc-us-central1-a.eth.prod": "enode://e87f1d8093d304c3a9d6f1165b85d6b374f1c0cc907d39c0879eb67f0a39d779be7a85cbd52920b6f53a94da43099c58837034afa6a7be4b099bfcd79ad13999@35.238.106.101:443"
}
},
"eth.staging": {
"boot": {
"boot-01.ac-cn-hongkong-c.eth.staging": "enode://630b0342ca4e9552f50714b6c8e28d6955bc0fd14e7950f93bc3b2b8cc8c1f3b6d103df66f51a13d773b5db0f130661fb5c7b8fa21c48890c64c79b41a56a490@47.91.229.44:443",
"boot-01.do-ams3.eth.staging": "enode://f79fb3919f72ca560ad0434dcc387abfe41e0666201ebdada8ede0462454a13deb05cda15f287d2c4bd85da81f0eb25d0a486bbbc8df427b971ac51533bd00fe@174.138.107.239:443",
"boot-01.gc-us-central1-a.eth.staging": "enode://10a78c17929a7019ef4aa2249d7302f76ae8a06f40b2dc88b7b31ebff4a623fbb44b4a627acba296c1ced3775d91fbe18463c15097a6a36fdb2c804ff3fc5b35@35.238.97.234:443"
},
"mail": {
"mail-01.ac-cn-hongkong-c.eth.staging": "enode://b74859176c9751d314aeeffc26ec9f866a412752e7ddec91b19018a18e7cca8d637cfe2cedcb972f8eb64d816fbd5b4e89c7e8c7fd7df8a1329fa43db80b0bfe@47.52.90.156:443",
"mail-01.do-ams3.eth.staging": "enode://69f72baa7f1722d111a8c9c68c39a31430e9d567695f6108f31ccb6cd8f0adff4991e7fdca8fa770e75bc8a511a87d24690cbc80e008175f40c157d6f6788d48@206.189.240.16:443",
"mail-01.gc-us-central1-a.eth.staging": "enode://e4fc10c1f65c8aed83ac26bc1bfb21a45cc1a8550a58077c8d2de2a0e0cd18e40fd40f7e6f7d02dc6cd06982b014ce88d6e468725ffe2c138e958788d0002a7f@35.239.193.41:443"
},
"rendezvous": {
"boot-01.ac-cn-hongkong-c.eth.staging": "/ip4/47.91.229.44/tcp/30703/ethv4/16Uiu2HAmRnt2Eyoknh3auxh4fJwkRgqkH1gqrWGes8Pk1k3MV4xu",
"boot-01.do-ams3.eth.staging": "/ip4/174.138.107.239/tcp/30703/ethv4/16Uiu2HAm8UZXUHEPZrpJbcQ3yVFH6UtKrwsG6jH4ai72PsbLfVFb",
"boot-01.gc-us-central1-a.eth.staging": "/ip4/35.238.97.234/tcp/30703/ethv4/16Uiu2HAm6G9sDMkrB4Xa5EH3Zx2dysCxFgBTSRzghic3Z9tRFRNE"
},
"whisper": {
"node-01.ac-cn-hongkong-c.eth.staging": "enode://088cf5a93c576fae52f6f075178467b8ff98bacf72f59e88efb16dfba5b30f80a4db78f8e3cb3d87f2f6521746ef4a8768465ef2896c6af24fd77a425e95b6dd@47.52.226.137:443",
"node-01.do-ams3.eth.staging": "enode://914c0b30f27bab30c1dfd31dad7652a46fda9370542aee1b062498b1345ee0913614b8b9e3e84622e84a7203c5858ae1d9819f63aece13ee668e4f6668063989@167.99.19.148:443",
"node-01.gc-us-central1-a.eth.staging": "enode://d3878441652f010326889f28360e69f2d09d06540f934fada0e17b374ce5319de64279aba3c44a5bf807d9967c6d705b3b4c6b03fa70763240e2ee6af01a539e@35.192.0.86:443"
}
},
"eth.test": {
"boot": {
"boot-01.ac-cn-hongkong-c.eth.test": "enode://daae2e72820e86e942fa2a8aa7d6e9954d4043a753483d8bd338e16be82cf962392d5c0e1ae57c3d793c3d3dddd8fd58339262e4234dc966f953cd73b535f5fa@47.52.188.149:443",
Expand Down
6 changes: 3 additions & 3 deletions src/app/core/fleets/fleet_configuration.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import json, typetraits, tables, sequtils, strutils

type
Fleet* {.pure.} = enum
Undefined = ""
WakuV2Prod = "wakuv2.prod"
WakuV2Test = "wakuv2.test"
Undefined = "",
WakuSandbox = "waku.sandbox"
WakuTest = "waku.test"
ShardsTest = "shards.test"
ShardsStaging = "shards.staging"

Expand Down
30 changes: 11 additions & 19 deletions src/app_service/service/node_configuration/service.nim
Original file line number Diff line number Diff line change
Expand Up @@ -167,25 +167,17 @@ proc setFleet*(self: Service, fleet: string): bool =
self.fleetConfiguration.getNodes(fleetType, FleetNodes.Rendezvous)

var dnsDiscoveryURL: seq[string] = @[]
case fleetType
of Fleet.WakuV2Prod:
dnsDiscoveryURL.add(
"enrtree://ANEDLO25QVUGJOUTQFRYKWX6P4Z4GKVESBMHML7DZ6YK4LGS5FC5O@prod.wakuv2.nodes.status.im"
)
of Fleet.WakuV2Test:
dnsDiscoveryURL.add(
"enrtree://AO47IDOLBKH72HIZZOXQP6NMRESAN7CHYWIBNXDXWRJRZWLODKII6@test.wakuv2.nodes.status.im"
)
of Fleet.ShardsTest:
dnsDiscoveryURL.add(
"enrtree://AMOJVZX4V6EXP7NTJPMAYJYST2QP6AJXYW76IU6VGJS7UVSNDYZG4@boot.test.shards.nodes.status.im"
)
of Fleet.ShardsStaging:
dnsDiscoveryURL.add(
"enrtree://AI4W5N5IFEUIHF5LESUAOSMV6TKWF2MB6GU2YK7PU4TYUGUNOCEPW@boot.staging.shards.nodes.status.im"
)
else:
discard
case fleetType:
of Fleet.WakuSandbox:
dnsDiscoveryURL.add("enrtree://AIRVQ5DDA4FFWLRBCHJWUWOO6X6S4ZTZ5B667LQ6AJU6PEYDLRD5O@sandbox.waku.nodes.status.im")
of Fleet.WakuTest:
dnsDiscoveryURL.add("enrtree://AOGYWMBYOUIMOENHXCHILPKY3ZRFEULMFI4DOM442QSZ73TT2A7VI@test.waku.nodes.status.im")
of Fleet.ShardsTest:
dnsDiscoveryURL.add("enrtree://AMOJVZX4V6EXP7NTJPMAYJYST2QP6AJXYW76IU6VGJS7UVSNDYZG4@boot.test.shards.nodes.status.im")
of Fleet.ShardsStaging:
dnsDiscoveryURL.add("enrtree://AI4W5N5IFEUIHF5LESUAOSMV6TKWF2MB6GU2YK7PU4TYUGUNOCEPW@boot.staging.shards.nodes.status.im")
else:
discard

newConfiguration.ClusterConfig.WakuNodes = dnsDiscoveryURL

Expand Down
15 changes: 6 additions & 9 deletions src/app_service/service/settings/dto/settings.nim
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,8 @@ type UpstreamConfig* = object

type PinnedMailserver* = object
ethProd*: string
ethStaging*: string
wakuv2Prod*: string
wakuv2Test*: string
wakuSandbox*: string
wakuTest*: string
goWakuTest*: string
statusTest*: string
statusProd*: string
Expand Down Expand Up @@ -170,9 +169,8 @@ type
proc toPinnedMailserver*(jsonObj: JsonNode): PinnedMailserver =
# we maintain pinned mailserver per fleet
discard jsonObj.getProp("eth.prod", result.ethProd)
discard jsonObj.getProp("eth.staging", result.ethStaging)
discard jsonObj.getProp("wakuv2.prod", result.wakuv2Prod)
discard jsonObj.getProp("wakuv2.test", result.wakuv2Test)
discard jsonObj.getProp("waku.sandbox", result.wakuSandbox)
discard jsonObj.getProp("waku.test", result.wakuTest)
discard jsonObj.getProp("status.test", result.statusTest)
discard jsonObj.getProp("status.prod", result.statusProd)
discard jsonObj.getProp("shards.test", result.shardsTest)
Expand Down Expand Up @@ -253,9 +251,8 @@ proc toSettingsDto*(jsonObj: JsonNode): SettingsDto =
proc pinnedMailserverToJsonNode*(mailserver: PinnedMailserver): JsonNode =
return %*{
"eth.prod": mailserver.ethProd,
"eth.staging": mailserver.ethStaging,
"wakuv2.prod": mailserver.wakuv2Prod,
"wakuv2.test": mailserver.wakuv2Test,
"waku.sandbox": mailserver.wakuSandbox,
"waku.test": mailserver.wakuTest,
"status.test": mailserver.statusTest,
"status.prod": mailserver.statusProd,
"shard.test": mailserver.shardsTest,
Expand Down
16 changes: 8 additions & 8 deletions src/app_service/service/settings/service.nim
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,10 @@ QtObject:
self.settings.currentUserStatus

proc getPinnedMailserver*(self: Service, fleet: Fleet): string =
if (fleet == Fleet.WakuV2Prod):
return self.settings.pinnedMailserver.wakuv2Prod
elif (fleet == Fleet.WakuV2Test):
return self.settings.pinnedMailserver.wakuv2Test
if (fleet == Fleet.WakuSandbox):
return self.settings.pinnedMailserver.wakuSandbox
elif (fleet == Fleet.WakuTest):
return self.settings.pinnedMailserver.wakuTest
elif (fleet == Fleet.ShardsTest):
return self.settings.pinnedMailserver.shardsTest
elif (fleet == Fleet.ShardsStaging):
Expand All @@ -420,10 +420,10 @@ QtObject:
var newMailserverJsonObj = self.settings.pinnedMailserver.pinnedMailserverToJsonNode()
newMailserverJsonObj[$fleet] = %* mailserverID
if(self.saveSetting(KEY_PINNED_MAILSERVERS, newMailserverJsonObj)):
if (fleet == Fleet.WakuV2Prod):
self.settings.pinnedMailserver.wakuv2Prod = mailserverID
elif (fleet == Fleet.WakuV2Test):
self.settings.pinnedMailserver.wakuv2Test = mailserverID
if (fleet == Fleet.WakuSandbox):
self.settings.pinnedMailserver.wakuSandbox = mailserverID
elif (fleet == Fleet.WakuTest):
self.settings.pinnedMailserver.wakuTest = mailserverID
elif (fleet == Fleet.ShardsTest):
self.settings.pinnedMailserver.shardsTest = mailserverID
elif (fleet == Fleet.ShardsStaging):
Expand Down
2 changes: 1 addition & 1 deletion ui/app/AppLayouts/Profile/popups/FleetsModal.qml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ModalPopup {

FleetRadioSelector {
advancedStore: popup.advancedStore
fleetName: Constants.waku_prod
fleetName: Constants.waku_sandbox
buttonGroup: fleetSettings
}

Expand Down
4 changes: 2 additions & 2 deletions ui/imports/utils/Constants.qml
Original file line number Diff line number Diff line change
Expand Up @@ -947,8 +947,8 @@ QtObject {
readonly property string eth_signTypedData: "eth_signTypedData"
readonly property string eth_signTypedData_v3: "eth_signTypedData_v3"

readonly property string waku_prod: "wakuv2.prod"
readonly property string waku_test: "wakuv2.test"
readonly property string waku_sandbox: "waku.sandbox"
readonly property string waku_test: "waku.test"
readonly property string shards_test: "shards.test"
readonly property string shards_staging: "shards.staging"

Expand Down