axelarnetwork / tofn

A threshold cryptography library in Rust
Apache License 2.0
112 stars 23 forks source link

facilitate timeout faults #65

Closed ggutoski closed 3 years ago

ggutoski commented 3 years ago

As discussed, we have two tasks to facilitate timeout fault processing:

Assigning to @sdaveas but I can advise on the change to expecting_more_msgs_this_round.

sdaveas commented 3 years ago

As discussed, we can respond to the Abort message with the list of parties we have not received an answer from. Note that malicious parties can choose not to respond to Abort message. Need to think if this complicates our task.

sdaveas commented 3 years ago

As discussed, there is the following problem:

Let A, B and C. Each needs to send bcasts. When R1 starts, each party has already self-delivered his bcast to himself, so their states is A: {A, , }, B:{ , B, }, C:{ , , C}. all parties agree that they are expecting more messages

A sends bcast: A: {A, , }, B:{ A, B, }, C:{ A, , C}. all parties agree that they are expecting more messages

B sends bcast: A: {A, B, }, B:{ A, B, }, C:{ A, B, C}. A and B agree that they expect more messages but C is ready to proceed to R1

One way to avoid that is to remove self delivery from tofn and rely on the broker (axelar-core) to send our message back to us.

sdaveas commented 3 years ago

What is the best fit for crimes associated with timeouts?

Stall{victim: usize, msg_type: MsgType} is the most detailed one, because it reviles which message was skipped towards which party (and of course the criminal from the index of the crime inside the crime list). When we have a broadcast message though, this victim field is redundant because all parties are victims. There are the following options:

  1. wrap it inside an Option
  2. set it to usize:: MAX
  3. remove victim altogether. It doesn't have practical usage as for the rest of the behaviours
sdaveas commented 3 years ago

Actually we should do opt 3 because all p2p message types already include a to field which is always the victim in our case.

ggutoski commented 3 years ago

Actually we should do opt 3 because all p2p message types already include a to field which is always the victim in our case.

Agreed