Skip to content

Commit 08d14fb

Browse files
add waku/waku_rln_relay/constants.nim file
1 parent 3c9b355 commit 08d14fb

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

waku/waku_rln_relay/constants.nim

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import stint
2+
3+
import ./protocol_types
4+
5+
import ../waku_keystore
6+
7+
# Acceptable roots for merkle root validation of incoming messages
8+
const AcceptableRootWindowSize* = 50
9+
10+
# RLN membership key and index files path
11+
const RlnCredentialsFilename* = "rlnCredentials.txt"
12+
13+
# inputs of the membership contract constructor
14+
# TODO may be able to make these constants private and put them inside the waku_rln_relay_utils
15+
const
16+
# in wei
17+
MembershipFee* = 0.u256
18+
# the current implementation of the rln lib supports a circuit for Merkle tree with depth 20
19+
MerkleTreeDepth* = 20
20+
EthClient* = "http://127.0.0.1:8540"
21+
22+
const
23+
# the size of poseidon hash output in bits
24+
HashBitSize* = 256
25+
# the size of poseidon hash output as the number hex digits
26+
HashHexSize* = int(HashBitSize / 4)
27+
28+
const DefaultRlnTreePath* = "rln_tree.db"
29+
30+
const
31+
# pre-processed "rln/waku-rln-relay/v2.0.0" to array[32, byte]
32+
DefaultRlnIdentifier*: RlnIdentifier = [
33+
114, 108, 110, 47, 119, 97, 107, 117, 45, 114, 108, 110, 45, 114, 101, 108, 97, 121,
34+
47, 118, 50, 46, 48, 46, 48, 0, 0, 0, 0, 0, 0, 0,
35+
]
36+
DefaultUserMessageLimit* = UserMessageLimit(20)
37+
38+
const MaxClockGapSeconds* = 20.0 # the maximum clock difference between peers in seconds
39+
40+
# RLN Keystore defaults
41+
const RLNAppInfo* = AppInfo(
42+
application: "waku-rln-relay", appIdentifier: "01234567890abcdef", version: "0.2"
43+
)

0 commit comments

Comments
 (0)