chore(rln-relay): re-enable root validation (#1445)

* fix(rln-relay): enable root validation

* fix(rln-relay): unused import
This commit is contained in:
Aaryamann Challani 2022-12-05 23:52:54 +05:30 committed by GitHub
parent b56c4340f7
commit 2e0db18cde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -7,7 +7,6 @@ import
std/[options, tables, deques],
stew/arrayops,
chronos,
stint,
web3,
eth/keys
import

View File

@ -734,11 +734,10 @@ proc validateMessage*(rlnPeer: WakuRLNRelay, msg: WakuMessage,
waku_rln_invalid_messages_total.inc(labelValues=["invalid_epoch"])
return MessageValidationResult.Invalid
## TODO: FIXME after resolving this issue https://github.com/status-im/nwaku/issues/1247
if not rlnPeer.validateRoot(proof.merkleRoot):
debug "invalid message: provided root does not belong to acceptable window of roots", provided=proof.merkleRoot, validRoots=rlnPeer.validMerkleRoots.mapIt(it.inHex())
waku_rln_invalid_messages_total.inc(labelValues=["invalid_root"])
# return MessageValidationResult.Invalid
return MessageValidationResult.Invalid
# verify the proof
let