Skip to content

Commit

Permalink
chore(rln-relay): use new config for ffi (#1718)
Browse files Browse the repository at this point in the history
* chore(rln-relay): use new config for ffi

* chore: update zerokit submodule

* fix: missing comma
  • Loading branch information
rymnc committed May 10, 2023
1 parent 4b59e47 commit 44c5431
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion waku/v2/waku_rln_relay/constants.nim
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import
std/json,
stint

import
../waku_keystore


# Acceptable roots for merkle root validation of incoming messages
const AcceptableRootWindowSize* = 5

Expand All @@ -28,7 +30,7 @@ const
const
# The relative folder where the circuit, proving and verification key for RLN can be found
# Note that resources has to be compiled with respect to the above MerkleTreeDepth
RlnResourceFolder* = "tree_height_" & $MerkleTreeDepth & "/"
RlnConfig* = $(%* { "resources_folder": "tree_height_" & $MerkleTreeDepth & "/" })

# temporary variables to test waku-rln-relay performance in the static group mode
const
Expand Down
2 changes: 1 addition & 1 deletion waku/v2/waku_rln_relay/rln/wrappers.nim
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ proc createRLNInstanceLocal*(d: int = MerkleTreeDepth): RLNResult =
var
rlnInstance: ptr RLN
merkleDepth: csize_t = uint(d)
resourcesPathBuffer = RlnResourceFolder.toOpenArrayByte(0, RlnResourceFolder.high).toBuffer()
resourcesPathBuffer = RlnConfig.toOpenArrayByte(0, RlnConfig.high).toBuffer()

# create an instance of RLN
let res = new_circuit(merkleDepth, addr resourcesPathBuffer, addr rlnInstance)
Expand Down

0 comments on commit 44c5431

Please sign in to comment.