vac.dev/static/img/rln-relay/rln-relay.msc

32 lines
1007 B
Plaintext

# Sequence diagram for RLN Relay protocol (registration)
msc {
hscale = "2";
d [label = "RLN-Relay Node B"], a [label = "RLN-Relay Node A"],b [label = "Membership Contract"];
# a rbox a [label="Relay Node A"],
# b note b [label="Membership Contract"],
# d rbox d [label = "Relay Node B"];
|||;
a box a [ label=" \n Generate sk,pk \n "] ;
a=>b [ label = " \n Register(pk, x ETH) \n " ] ;
|||;
b box b [label=" \n Insert pk to the list \n "];
//|||;
//b=>a [ label = "index"];
|||;
..., ---;
... [ label = "Other relay nodes register and the membership contract gets updatetd" ];
..., ---;
# a=>b [ label = "getRoot()" ] ;
# b box b [label=" \n root: Get the current root\n "];
# b=>a [ label = "root"];
# ..., --- [ label = " " ];
# a=>b [ label = "getAuthPath(index)" ] ;
# b box b [label=" \n authPath: Calculate the authentication path of the leaf with the given index and based on the current tree\n "];
# b=>a [ label = "authPath"];
}