Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(rln-relay): use new config for ffi #1718

Merged
merged 3 commits into from
May 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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