Trust-Machines / wsts

Weighted Schnorr Threshold Signatures
Apache License 2.0
27 stars 13 forks source link

State machines do not handle errors well #52

Open xoloki opened 9 months ago

xoloki commented 9 months ago

While testing an initial implementation of #51 it became apparent that errors in the coordinator state machine process loop fell through to the top level, which meant that we did not return an error packet, we just logged an error locally.

Update the state machines to always check for errors when it is possible to return an error packet, and do so if necessary.

xoloki commented 3 weeks ago

Commit 2d57f2040032d274030bc0e35d580d5ee751760b returns an OperationResult::SignError when gather_sig_shares fails. We were already doing this for DkgError. There are lots more ? error redirects in the coordinator process_message loops, they should all be examined.