axelarnetwork / tofn

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

Enable robust protocols in tofn sdk #188

Closed ggutoski closed 3 years ago

ggutoski commented 3 years ago

At the beginning of a round the tofn sdk will preemptively end the protocol in sad path if it detects faulters before execution reaches the actual protocol code. This is bad if your protocol is robust against faulters. We need to enable protocol implementers to op out of this behaviour. Examples of preemptive sad path:

  1. In Round::execute_next_round: https://github.com/axelarnetwork/tofn/blob/6edd85215cc0ab0f881c92b1381cd85360b7dbd1/src/sdk/round.rs#L207-L214
  2. In the default impl for ExecuteRaw: https://github.com/axelarnetwork/tofn/blob/6edd85215cc0ab0f881c92b1381cd85360b7dbd1/src/sdk/executer.rs#L105-L107

Implementers can opt out of item 2 by implementing your own ExecuteRaw but there's currently no way to opt out of item 1.