rfc/assets/rln-relay/rln-message-verification.msc

43 lines
1.9 KiB
Plaintext
Raw Normal View History

Adds the sequence diagram of rln relay (#264) * adds the registration image * Updates the registration seq diagram with more descriotions * WIP: the message verification diagram * fixes some spacing issues * minor * adds the routing and publishing figure * minor * fixes a format issue * adds nullifier map init for all the relay nodes * removes box borders * returns the borders * fixes spacing issues * Feature/add json rpc api spec (#265) * Minor improvements; added polling for latest messages * internalNullifier -> nullifier, and edits on the msc figures * edits the slash part * updates spacing of the rln-relay figure * edits on entities * Update waku-rln-relay.md * adds references to the figures in the text * minor * adds one more relay node to the registration fig * Add Admin API (#267) * Add Admin API * Update assets/rln-relay/rln-relay.msc Co-authored-by: Oskar Thorén <ot@oskarthoren.com> * changes the width of figure 2 * some spacing edits and file headers * adds the registration image * Updates the registration seq diagram with more descriotions * WIP: the message verification diagram * fixes some spacing issues * minor * adds the routing and publishing figure * minor * fixes a format issue * adds nullifier map init for all the relay nodes * removes box borders * returns the borders * fixes spacing issues * internalNullifier -> nullifier, and edits on the msc figures * edits the slash part * updates spacing of the rln-relay figure * edits on entities * Update waku-rln-relay.md * adds references to the figures in the text * minor * adds one more relay node to the registration fig * Update assets/rln-relay/rln-relay.msc Co-authored-by: Oskar Thorén <ot@oskarthoren.com> * changes the width of figure 2 * some spacing edits and file headers Co-authored-by: Hanno Cornelius <68783915+jm-clius@users.noreply.github.com> Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
2020-12-07 04:52:31 +00:00
# Sequence diagram for RLN Relay protocol (publishing,routing, and slashing)
msc {
hscale="1",
wordwraparcs=true;
a [label=" "],
b [label=" "],
c [label=" "],
d [label=" "],
e [label=" "];
a rbox a [label="Relay Node: Publisher"],
b rbox b [label="Relay Node: Router"],
c rbox c [label="Relay Node"],
d rbox d [label="Relay Node"],
e note e [label="Membership Contract"];
|||;
b box b [label=" \n nullifierMap= [(nullifier, shareX, shareY)...] \n \n Initialize an empty map of the received nullifiers \n "],
c box c [label=" \n nullifierMap= [(nullifier, shareX, shareY)...] \n \n Initialize an empty map of the received nullifiers \n "],
d box d [label=" \n nullifierMap= [(nullifier, shareX, shareY)...] \n \n Initialize an empty map of the received nullifiers \n "];
|||;
...,
a -> a [label="Keep track of epoch"],
b -> b [label="Keep track of epoch"],
c -> c [label="Keep track of epoch"],
d -> d [label="Keep track of epoch"];
a box a [label=" \n Message: the intended message \n \n epoch: the current epoch \n "];
a box a [label=" \n A(x) = sk + H(sk, epoch)x \n \n shareX = H(message), shareY = A(shareX) \n \n nullifier = H(H(sk,epoch)) \n "];
a box a [label=" \n zkProof: generate the proof using zkSNARK \n "];
|||;
a => b [label="Message, epoch, proofBundle:(shareX, shareY, nullifier, zkProof) \n "];
b box b [label="1. If the received epoch is far from the current epoch"];
b -x c [label="Do not relay"];
b box b [label=" \n 2. If verification of zkProof failed \n "];
b -x c [label="Do not relay"];
b box b [label=" \n 3. If identical nullifier exists in the nullifierMap, \n \n extract the publisher sk \n "];
b -x c [label="Do not relay"];
b => e [label="Slash the publisher: Unlbock the deposit associated with sk"];
e => b [label="x ETH"];
b box b [label=" \n 4. If none of 1-3 happens, update the nullifierMap \n "];
b => c [label="Relay"];
b => d [label="Relay"];
}