mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-05-28 13:19:52 +00:00
chore(rln-relay): re-enable root validation (#1445)
* fix(rln-relay): enable root validation * fix(rln-relay): unused import
This commit is contained in:
parent
b56c4340f7
commit
2e0db18cde
@ -7,7 +7,6 @@ import
|
|||||||
std/[options, tables, deques],
|
std/[options, tables, deques],
|
||||||
stew/arrayops,
|
stew/arrayops,
|
||||||
chronos,
|
chronos,
|
||||||
stint,
|
|
||||||
web3,
|
web3,
|
||||||
eth/keys
|
eth/keys
|
||||||
import
|
import
|
||||||
|
|||||||
@ -734,11 +734,10 @@ proc validateMessage*(rlnPeer: WakuRLNRelay, msg: WakuMessage,
|
|||||||
waku_rln_invalid_messages_total.inc(labelValues=["invalid_epoch"])
|
waku_rln_invalid_messages_total.inc(labelValues=["invalid_epoch"])
|
||||||
return MessageValidationResult.Invalid
|
return MessageValidationResult.Invalid
|
||||||
|
|
||||||
## TODO: FIXME after resolving this issue https://github.com/status-im/nwaku/issues/1247
|
|
||||||
if not rlnPeer.validateRoot(proof.merkleRoot):
|
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())
|
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"])
|
waku_rln_invalid_messages_total.inc(labelValues=["invalid_root"])
|
||||||
# return MessageValidationResult.Invalid
|
return MessageValidationResult.Invalid
|
||||||
|
|
||||||
# verify the proof
|
# verify the proof
|
||||||
let
|
let
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user