2018-03-26 12:52:19 +00:00
|
|
|
package params
|
|
|
|
|
2018-07-25 14:03:35 +00:00
|
|
|
// Define available fleets.
|
|
|
|
const (
|
2024-05-16 00:09:28 +00:00
|
|
|
FleetUndefined = ""
|
|
|
|
FleetProd = "eth.prod"
|
2024-07-11 14:37:16 +00:00
|
|
|
FleetStatusStaging = "status.staging"
|
2024-05-17 15:22:45 +00:00
|
|
|
FleetStatusProd = "status.prod"
|
|
|
|
FleetStatusTest = "status.test"
|
2024-03-15 15:30:16 +00:00
|
|
|
FleetWakuSandbox = "waku.sandbox"
|
|
|
|
FleetWakuTest = "waku.test"
|
2018-07-25 14:03:35 +00:00
|
|
|
)
|
|
|
|
|
2018-08-21 13:48:58 +00:00
|
|
|
// Cluster defines a list of Ethereum nodes.
|
|
|
|
type Cluster struct {
|
2018-08-08 08:41:46 +00:00
|
|
|
StaticNodes []string `json:"staticnodes"`
|
|
|
|
BootNodes []string `json:"bootnodes"`
|
|
|
|
MailServers []string `json:"mailservers"` // list of trusted mail servers
|
|
|
|
RendezvousNodes []string `json:"rendezvousnodes"`
|
2018-03-26 12:52:19 +00:00
|
|
|
}
|
2024-02-22 19:32:24 +00:00
|
|
|
|
2024-05-26 23:16:26 +00:00
|
|
|
type FleetName = string
|
|
|
|
type NodeType = string
|
|
|
|
|
|
|
|
const (
|
|
|
|
WakuNodes NodeType = "WakuNodes"
|
|
|
|
DiscV5BootstrapNodes NodeType = "DiscV5BootstrapNodes"
|
|
|
|
)
|
|
|
|
|
2024-02-22 19:32:24 +00:00
|
|
|
// DefaultWakuNodes is a list of "supported" fleets. This list is populated to clients UI settings.
|
2024-05-26 23:16:26 +00:00
|
|
|
var supportedFleets = map[FleetName]map[NodeType][]string{
|
2024-07-11 14:37:16 +00:00
|
|
|
FleetStatusStaging: {
|
2024-05-26 23:16:26 +00:00
|
|
|
WakuNodes: {
|
2024-07-11 14:37:16 +00:00
|
|
|
"enrtree://AI4W5N5IFEUIHF5LESUAOSMV6TKWF2MB6GU2YK7PU4TYUGUNOCEPW@boot.staging.status.nodes.status.im",
|
2024-05-26 23:16:26 +00:00
|
|
|
},
|
|
|
|
DiscV5BootstrapNodes: {
|
2024-07-11 14:37:16 +00:00
|
|
|
"enrtree://AI4W5N5IFEUIHF5LESUAOSMV6TKWF2MB6GU2YK7PU4TYUGUNOCEPW@boot.staging.status.nodes.status.im",
|
2024-05-26 23:16:26 +00:00
|
|
|
"enr:-QEQuEDsh6FgAb_36cReaX7W4gWx_7_GNpsUki7bXMoMrrrWij5pDEyV3guR-urDW_6GJTAzpQiJV61F-CfNn_NxPbY-AYJpZIJ2NIJpcISPxvrpim11bHRpYWRkcnO4YAAtNihib290LTAxLmRvLWFtczMuc2hhcmRzLnN0YWdpbmcuc3RhdHVzLmltBnZfAC82KGJvb3QtMDEuZG8tYW1zMy5zaGFyZHMuc3RhZ2luZy5zdGF0dXMuaW0GAbveA4Jyc40AEAUAAQAgAEAAgAEAiXNlY3AyNTZrMaEDIH8BcuEzgnmwPQTu7BPYyg4u4om7K9qekKA2gT_H2wSDdGNwgnZfg3VkcIIjKIV3YWt1Mg0",
|
2024-07-11 14:37:16 +00:00
|
|
|
"enr:-QEiuED2UusuHo1d6WN2-tHjtj0T0gdnsOh7aRZnFF6OEYLDbyxOtQo2_4dFUHhc9xm5SHNrWJJq8X7FRsxc4VCMGjjbAYJpZIJ2NIJpcIRoxQVgim11bHRpYWRkcnO4cgA2NjFib290LTAxLmdjLXVzLWNlbnRyYWwxLWEuc3RhdHVzLnN0YWdpbmcuc3RhdHVzLmltBnZfADg2MWJvb3QtMDEuZ2MtdXMtY2VudHJhbDEtYS5zdGF0dXMuc3RhZ2luZy5zdGF0dXMuaW0GAbveA4Jyc40AEAUAAQAgAEAAgAEAiXNlY3AyNTZrMaEDNAvlGjekD1YV4WpmjwArGAH2g9kHFJnMRfgUhcIkoA2DdGNwgnZfg3VkcIIjKIV3YWt1Mg0",
|
|
|
|
"enr:-QEiuECJPv2vL00Jp5sTEMAFyW7qXkK2cFgphlU_G8-FJuJqoW_D5aWIy3ylGdv2K8DkiG7PWgng4Ql_VI7Qc2RhBdwfAYJpZIJ2NIJpcIQvTKi6im11bHRpYWRkcnO4cgA2NjFib290LTAxLmFjLWNuLWhvbmdrb25nLWMuc3RhdHVzLnN0YWdpbmcuc3RhdHVzLmltBnZfADg2MWJvb3QtMDEuYWMtY24taG9uZ2tvbmctYy5zdGF0dXMuc3RhZ2luZy5zdGF0dXMuaW0GAbveA4Jyc40AEAUAAQAgAEAAgAEAiXNlY3AyNTZrMaEDkbgV7oqPNmFtX5FzSPi9WH8kkmrPB1R3n9xRXge91M-DdGNwgnZfg3VkcIIjKIV3YWt1Mg0",
|
2024-05-26 23:16:26 +00:00
|
|
|
},
|
|
|
|
},
|
2024-07-29 21:19:48 +00:00
|
|
|
FleetStatusProd: {
|
2024-05-26 23:16:26 +00:00
|
|
|
WakuNodes: {
|
2024-07-29 21:19:48 +00:00
|
|
|
"enrtree://AMOJVZX4V6EXP7NTJPMAYJYST2QP6AJXYW76IU6VGJS7UVSNDYZG4@boot.prod.status.nodes.status.im",
|
2024-05-26 23:16:26 +00:00
|
|
|
},
|
|
|
|
DiscV5BootstrapNodes: {
|
2024-07-29 21:19:48 +00:00
|
|
|
"enrtree://AMOJVZX4V6EXP7NTJPMAYJYST2QP6AJXYW76IU6VGJS7UVSNDYZG4@boot.prod.status.nodes.status.im",
|
|
|
|
"enr:-QEKuED9AJm2HGgrRpVaJY2nj68ao_QiPeUT43sK-aRM7sMJ6R4G11OSDOwnvVacgN1sTw-K7soC5dzHDFZgZkHU0u-XAYJpZIJ2NIJpcISnYxMvim11bHRpYWRkcnO4WgAqNiVib290LTAxLmRvLWFtczMuc3RhdHVzLnByb2Quc3RhdHVzLmltBnZfACw2JWJvb3QtMDEuZG8tYW1zMy5zdGF0dXMucHJvZC5zdGF0dXMuaW0GAbveA4Jyc40AEAUAAQAgAEAAgAEAiXNlY3AyNTZrMaEC3rRtFQSgc24uWewzXaxTY8hDA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5DDA4FFWLRBCHJWUWOO6X6S4ZTZ5B667LQ6AJU6PEYDLRD5O@sandbox.waku.nodes.status.im",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
FleetWakuTest: {
|
|
|
|
WakuNodes: {
|
|
|
|
"enrtree://AOGYWMBYOUIMOENHXCHILPKY3ZRFEULMFI4DOM442QSZ73TT2A7VI@test.waku.nodes.status.im",
|
|
|
|
},
|
|
|
|
DiscV5BootstrapNodes: {
|
|
|
|
"enrtree://AOGYWMBYOUIMOENHXCHILPKY3ZRFEULMFI4DOM442QSZ73TT2A7VI@test.waku.nodes.status.im",
|
|
|
|
},
|
|
|
|
},
|
2024-02-22 19:32:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func DefaultWakuNodes(fleet string) []string {
|
2024-05-26 23:16:26 +00:00
|
|
|
return supportedFleets[fleet][WakuNodes]
|
|
|
|
}
|
|
|
|
|
|
|
|
func DefaultDiscV5Nodes(fleet string) []string {
|
|
|
|
return supportedFleets[fleet][DiscV5BootstrapNodes]
|
|
|
|
|
2024-02-22 19:32:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func IsFleetSupported(fleet string) bool {
|
|
|
|
_, ok := supportedFleets[fleet]
|
|
|
|
return ok
|
|
|
|
}
|
|
|
|
|
2024-05-26 23:16:26 +00:00
|
|
|
func GetSupportedFleets() map[FleetName]map[NodeType][]string {
|
2024-02-22 19:32:24 +00:00
|
|
|
return supportedFleets
|
|
|
|
}
|