diff --git a/waku/v2/protocol/waku_rln_relay/waku_rln_relay_types.nim b/waku/v2/protocol/waku_rln_relay/waku_rln_relay_types.nim index 9cec9f439..d923772bf 100644 --- a/waku/v2/protocol/waku_rln_relay/waku_rln_relay_types.nim +++ b/waku/v2/protocol/waku_rln_relay/waku_rln_relay_types.nim @@ -147,6 +147,7 @@ when defined(rlnzerokit): contentTopic*: string # the log of nullifiers and Shamir shares of the past messages grouped per epoch nullifierLog*: Table[Epoch, seq[ProofMetadata]] + lastEpoch*: Epoch # the epoch of the last published rln message validMerkleRoots*: Deque[MerkleNode] # An array of valid merkle roots, which are updated in a FIFO fashion diff --git a/waku/v2/protocol/waku_rln_relay/waku_rln_relay_utils.nim b/waku/v2/protocol/waku_rln_relay/waku_rln_relay_utils.nim index d3a46aead..a893a4ca8 100644 --- a/waku/v2/protocol/waku_rln_relay/waku_rln_relay_utils.nim +++ b/waku/v2/protocol/waku_rln_relay/waku_rln_relay_utils.nim @@ -1158,7 +1158,7 @@ proc mount(node: WakuNode, info "WakuRLNRelay is mounted successfully", pubsubtopic=conf.rlnRelayPubsubTopic, contentTopic=conf.rlnRelayContentTopic return ok(true) else: # mount the rln relay protocol in the on-chain/dynamic mode - info " setting up waku-rln-relay in on-chain mode... " + echo " setting up waku-rln-relay in on-chain mode... " # read related inputs to run rln-relay in on-chain mode and do type conversion when needed let @@ -1174,7 +1174,7 @@ proc mount(node: WakuNode, # if there is a credential file, then no new credentials are generated, instead the content of the file is read and used to mount rln-relay if conf.rlnRelayCredPath != "": let rlnRelayCredPath = joinPath(conf.rlnRelayCredPath, RlnCredentialsFilename) - debug "rln-relay credential path", rlnRelayCredPath=rlnRelayCredPath + debug "rln-relay credential path", rlnRelayCredPath # check if there is an rln-relay credential file in the supplied path if fileExists(rlnRelayCredPath): # retrieve rln-relay credential @@ -1185,6 +1185,7 @@ proc mount(node: WakuNode, ethAccountPrivKeyOpt = ethAccountPrivKeyOpt, pubsubTopic = conf.rlnRelayPubsubTopic, contentTopic = conf.rlnRelayContentTopic, spamHandler = spamHandler, registrationHandler = registrationHandler) if res.isErr: return err("dynamic rln-relay could not be mounted: " & res.error()) + else: # there is no credential file available in the supplied path # mount the rln-relay protocol leaving rln-relay credentials arguments unassigned # this infroms mountRlnRelayDynamic proc that new credentials should be generated and registered to the membership contract @@ -1210,7 +1211,8 @@ proc mount(node: WakuNode, contentTopic = conf.rlnRelayContentTopic, spamHandler = spamHandler, registrationHandler = registrationHandler) if res.isErr: return err("dynamic rln-relay could not be mounted: " & res.error()) - return ok(true) + + return ok(true) proc mountRlnRelay*(node: WakuNode,