2024-02-07 11:42:20 +00:00
|
|
|
|
when (NimMajor, NimMinor) < (1, 4):
|
|
|
|
|
{.push raises: [Defect].}
|
|
|
|
|
else:
|
|
|
|
|
{.push raises: [].}
|
|
|
|
|
|
|
|
|
|
type ClusterConf* = object
|
|
|
|
|
maxMessageSize*: string
|
|
|
|
|
clusterId*: uint32
|
|
|
|
|
rlnRelay*: bool
|
|
|
|
|
rlnRelayEthContractAddress*: string
|
|
|
|
|
rlnRelayDynamic*: bool
|
|
|
|
|
rlnRelayBandwidthThreshold*: int
|
2024-02-28 16:19:20 +00:00
|
|
|
|
rlnEpochSizeSec*: uint64
|
|
|
|
|
rlnRelayUserMessageLimit*: uint64
|
2024-02-07 11:42:20 +00:00
|
|
|
|
pubsubTopics*: seq[string]
|
|
|
|
|
discv5Discovery*: bool
|
|
|
|
|
discv5BootstrapNodes*: seq[string]
|
|
|
|
|
|
2024-04-04 06:19:31 +00:00
|
|
|
|
# cluster-id=0
|
|
|
|
|
# Cluster configuration for the default pubsub topic. Note that it
|
|
|
|
|
# overrides existing cli configuration
|
|
|
|
|
proc ClusterZeroConf*(T: type ClusterConf): ClusterConf =
|
|
|
|
|
return ClusterConf(
|
|
|
|
|
clusterId: 0.uint32,
|
|
|
|
|
pubsubTopics: @["/waku/2/default-waku/proto"]
|
|
|
|
|
# TODO: Add more config such as bootstrap, etc
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# cluster-id=1 (aka The Waku Network)
|
2024-02-07 11:42:20 +00:00
|
|
|
|
# Cluster configuration corresponding to The Waku Network. Note that it
|
2024-02-28 16:19:20 +00:00
|
|
|
|
# overrides existing cli configuration
|
2024-02-07 11:42:20 +00:00
|
|
|
|
proc TheWakuNetworkConf*(T: type ClusterConf): ClusterConf =
|
|
|
|
|
return ClusterConf(
|
|
|
|
|
maxMessageSize: "150KiB",
|
|
|
|
|
clusterId: 1.uint32,
|
|
|
|
|
rlnRelay: true,
|
|
|
|
|
rlnRelayEthContractAddress: "0xF471d71E9b1455bBF4b85d475afb9BB0954A29c4",
|
|
|
|
|
rlnRelayDynamic: true,
|
|
|
|
|
rlnRelayBandwidthThreshold: 0,
|
2024-02-28 16:19:20 +00:00
|
|
|
|
rlnEpochSizeSec: 1,
|
|
|
|
|
# parameter to be defined with rln_v2
|
|
|
|
|
rlnRelayUserMessageLimit: 1,
|
2024-02-07 11:42:20 +00:00
|
|
|
|
pubsubTopics:
|
|
|
|
|
@[
|
|
|
|
|
"/waku/2/rs/1/0", "/waku/2/rs/1/1", "/waku/2/rs/1/2", "/waku/2/rs/1/3",
|
2024-03-15 23:08:47 +00:00
|
|
|
|
"/waku/2/rs/1/4", "/waku/2/rs/1/5", "/waku/2/rs/1/6", "/waku/2/rs/1/7",
|
2024-02-07 11:42:20 +00:00
|
|
|
|
],
|
|
|
|
|
discv5Discovery: true,
|
|
|
|
|
discv5BootstrapNodes:
|
|
|
|
|
@[
|
|
|
|
|
"enr:-QESuEC1p_s3xJzAC_XlOuuNrhVUETmfhbm1wxRGis0f7DlqGSw2FM-p2Ugl_r25UHQJ3f1rIRrpzxJXSMaJe4yk1XFSAYJpZIJ2NIJpcISygI2rim11bHRpYWRkcnO4XAArNiZub2RlLTAxLmRvLWFtczMud2FrdS50ZXN0LnN0YXR1c2ltLm5ldAZ2XwAtNiZub2RlLTAxLmRvLWFtczMud2FrdS50ZXN0LnN0YXR1c2ltLm5ldAYfQN4DgnJzkwABCAAAAAEAAgADAAQABQAGAAeJc2VjcDI1NmsxoQJATXRSRSUyTw_QLB6H_U3oziVQgNRgrXpK7wp2AMyNxYN0Y3CCdl-DdWRwgiMohXdha3UyDw",
|
|
|
|
|
"enr:-QEkuECnZ3IbVAgkOzv-QLnKC4dRKAPRY80m1-R7G8jZ7yfT3ipEfBrhKN7ARcQgQ-vg-h40AQzyvAkPYlHPaFKk6u9uAYJpZIJ2NIJpcIQiEAFDim11bHRpYWRkcnO4bgA0Ni9ub2RlLTAxLmdjLXVzLWNlbnRyYWwxLWEud2FrdS50Z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