Skip to content

New join party

Ford Betelgeuse requested to merge new_join_party into master

we add a new stream to the current Tss.

to make it compatible with the current, we use block height to decide which join party we apply. if the block heigh is 0, it indicates the old leaderness join party otherwise, we use the leader join party.

The leader join party works as follows:

  1. leader selection:

a)when the tss receives the request, it hash the msgID+ tss participant pub keys+ this node peerID to calculate a value of this peer. b) it sorts the value of each node, and the node has the largest value is nominated as the leader.

  1. join party with leader:
  • a) each node run the leader selection to find out who is the leader.
  • b) if he is the leader, he will wait for other pees to send join party request to him with timeout of 30 seconds.
  • c) if he is the member, he will send join party request to the leader.
  • d) if the leader get enough requests, it will broadcast to all peers that who will do the keysign/keygen, or if the leader do not get enough requests, it will broadcast the failure of join party to everyone with whom send me the requests.
  • e) all the members receive the request and do the keygen/keysign with the nodes are returned by the leader or quit the join party with error.

if join party fails, the leader will be blamed(it is a bit unfair for the keygen, while for the keysign, since 2/3 are honest, so it has no reason to fail the tss).

  1. keygen and keysign with new join party. a) keygen: for keygen, it is easy as we need all nodes to participant, if any party does not show up, it will fail.

b) keysign: it is tricky, we need to run waiting for signature at the same time we do the join party. as we only have threshold of nodes running the keysign. all the nodes that not running the keysign should wait for signature.

waiting for signature needs to talk to join party for the following reasons.

    1. a node is late, so when he sends join party, he will timeout(as the leader has already start keysign with other pees), so when he gets the signature, he will stop join party immediately to avoid join party timeout.
    1. a node successfully be a member of keysign, after join party, it will notify waiting for signature to stop, as he will generate the signature with other peers.
    1. if a node doing the join party while he is not in the list of the participants running the keysign, he will quit join party immediately and wait for the signature notification.
Edited by Ford Betelgeuse

Merge request reports