mirror of https://github.com/waku-org/nwaku.git
57 lines
2.7 KiB
Nim
57 lines
2.7 KiB
Nim
when (NimMajor, NimMinor) < (1, 4):
|
||
{.push raises: [Defect].}
|
||
else:
|
||
{.push raises: [].}
|
||
|
||
type ClusterConf* = object
|
||
maxMessageSize*: string
|
||
clusterId*: uint16
|
||
rlnRelay*: bool
|
||
rlnRelayEthContractAddress*: string
|
||
rlnRelayDynamic*: bool
|
||
rlnRelayBandwidthThreshold*: int
|
||
rlnEpochSizeSec*: uint64
|
||
rlnRelayUserMessageLimit*: uint64
|
||
pubsubTopics*: seq[string]
|
||
discv5Discovery*: bool
|
||
discv5BootstrapNodes*: seq[string]
|
||
|
||
# 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,
|
||
pubsubTopics:
|
||
@["/waku/2/default-waku/proto"] # TODO: Add more config such as bootstrap, etc
|
||
,
|
||
)
|
||
|
||
# cluster-id=1 (aka The Waku Network)
|
||
# Cluster configuration corresponding to The Waku Network. Note that it
|
||
# overrides existing cli configuration
|
||
proc TheWakuNetworkConf*(T: type ClusterConf): ClusterConf =
|
||
return ClusterConf(
|
||
maxMessageSize: "150KiB",
|
||
clusterId: 1,
|
||
rlnRelay: true,
|
||
rlnRelayEthContractAddress: "0xF471d71E9b1455bBF4b85d475afb9BB0954A29c4",
|
||
rlnRelayDynamic: true,
|
||
rlnRelayBandwidthThreshold: 0,
|
||
rlnEpochSizeSec: 1,
|
||
# parameter to be defined with rln_v2
|
||
rlnRelayUserMessageLimit: 1,
|
||
pubsubTopics:
|
||
@[
|
||
"/waku/2/rs/1/0", "/waku/2/rs/1/1", "/waku/2/rs/1/2", "/waku/2/rs/1/3",
|
||
"/waku/2/rs/1/4", "/waku/2/rs/1/5", "/waku/2/rs/1/6", "/waku/2/rs/1/7",
|
||
],
|
||
discv5Discovery: true,
|
||
disc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