mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-08-24 23:11:12 +00:00
chore!: separate internal and CLI configurations (#3357)
Split `WakuNodeConfig` object for better separation of concerns and to introduce a tree-like structure to configuration. * fix: ensure twn cluster conf is still applied when clusterId=1 * test: remove usage of `WakuNodeConf` * Remove macro, split builder files, remove wakunodeconf from tests * rm network_conf_builder module as it is not used --------- Co-authored-by: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com> Co-authored-by: Ivan Folgueira Bande <ivansete@status.im>
This commit is contained in:
committed by
GitHub
co-authored by
NagyZoltanPeter
Ivan Folgueira Bande
parent
6bc05efc02
commit
cc66c7fe78
@@ -134,11 +134,11 @@ suite "RLN Proofs as a Lightpush Service":
|
||||
|
||||
# mount rln-relay
|
||||
let wakuRlnConfig = WakuRlnConfig(
|
||||
rlnRelayDynamic: false,
|
||||
rlnRelayCredIndex: some(1.uint),
|
||||
rlnRelayUserMessageLimit: 1,
|
||||
rlnEpochSizeSec: 1,
|
||||
rlnRelayTreePath: genTempPath("rln_tree", "wakunode"),
|
||||
dynamic: false,
|
||||
credIndex: some(1.uint),
|
||||
userMessageLimit: 1,
|
||||
epochSizeSec: 1,
|
||||
treePath: genTempPath("rln_tree", "wakunode"),
|
||||
)
|
||||
|
||||
await allFutures(server.start(), client.start())
|
||||
|
||||
@@ -128,11 +128,11 @@ suite "RLN Proofs as a Lightpush Service":
|
||||
|
||||
# mount rln-relay
|
||||
let wakuRlnConfig = WakuRlnConfig(
|
||||
rlnRelayDynamic: false,
|
||||
rlnRelayCredIndex: some(1.uint),
|
||||
rlnRelayUserMessageLimit: 1,
|
||||
rlnEpochSizeSec: 1,
|
||||
rlnRelayTreePath: genTempPath("rln_tree", "wakunode"),
|
||||
dynamic: false,
|
||||
credIndex: some(1.uint),
|
||||
userMessageLimit: 1,
|
||||
epochSizeSec: 1,
|
||||
treePath: genTempPath("rln_tree", "wakunode"),
|
||||
)
|
||||
|
||||
await allFutures(server.start(), client.start())
|
||||
|
||||
@@ -83,16 +83,15 @@ proc getWakuRlnConfigOnChain*(
|
||||
ethClientAddress: Option[string] = none(string),
|
||||
): WakuRlnConfig =
|
||||
return WakuRlnConfig(
|
||||
rlnRelayDynamic: true,
|
||||
rlnRelayCredIndex: some(credIndex),
|
||||
rlnRelayEthContractAddress: rlnRelayEthContractAddress,
|
||||
rlnRelayEthClientAddress: ethClientAddress.get(EthClient),
|
||||
rlnRelayTreePath: genTempPath("rln_tree", "wakunode_" & $credIndex),
|
||||
rlnEpochSizeSec: 1,
|
||||
dynamic: true,
|
||||
credIndex: some(credIndex),
|
||||
ethContractAddress: rlnRelayEthContractAddress,
|
||||
ethClientAddress: ethClientAddress.get(EthClient),
|
||||
treePath: genTempPath("rln_tree", "wakunode_" & $credIndex),
|
||||
epochSizeSec: 1,
|
||||
onFatalErrorAction: fatalErrorHandler.get(fatalErrorVoidHandler),
|
||||
# If these are used, initialisation fails with "failed to mount WakuRlnRelay: could not initialize the group manager: the commitment does not have a membership"
|
||||
rlnRelayCredPath: keystorePath,
|
||||
rlnRelayCredPassword: password,
|
||||
creds: some(RlnRelayCreds(path: keystorePath, password: password)),
|
||||
)
|
||||
|
||||
proc setupRelayWithOnChainRln*(
|
||||
@@ -227,13 +226,13 @@ suite "Waku RlnRelay - End to End - Static":
|
||||
|
||||
let contractAddress = await uploadRLNContract(EthClient)
|
||||
let wakuRlnConfig = WakuRlnConfig(
|
||||
rlnRelayDynamic: true,
|
||||
rlnRelayCredIndex: some(0.uint),
|
||||
rlnRelayUserMessageLimit: 111,
|
||||
rlnRelayTreepath: genTempPath("rln_tree", "wakunode_0"),
|
||||
rlnRelayEthClientAddress: EthClient,
|
||||
rlnRelayEthContractAddress: $contractAddress,
|
||||
rlnRelayChainId: 1337,
|
||||
dynamic: true,
|
||||
credIndex: some(0.uint),
|
||||
userMessageLimit: 111,
|
||||
treepath: genTempPath("rln_tree", "wakunode_0"),
|
||||
ethClientAddress: EthClient,
|
||||
ethContractAddress: $contractAddress,
|
||||
chainId: 1337,
|
||||
onFatalErrorAction: proc(errStr: string) =
|
||||
raiseAssert errStr
|
||||
,
|
||||
|
||||
Reference in New Issue
Block a user