axelarnetwork / tofn

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

Sad path should return specific crimes #44

Closed ggutoski closed 3 years ago

ggutoski commented 3 years ago

Currently our sad path rounds return only a list of criminals with no information on what crime(s) they committed. In the future we might want to offer this information to tofn users so they can better decide how to punish criminals. (For example, maybe some crimes do not deserve as much punishment as others.)

Due to this design, our tests for malicious behaviour check only that sign participants agree on the list of criminals. This is bad because we cannot ensure code coverage by tests. Code coverage is especially important in complicated cases such as r8_fail_randomizer.

We should enhance our tests to check for specific crimes. Our current design does not allow for such checking, so we should change the design to allow it. Thus, I have pushed a new branch with a prototype design change.

Overview

Tidying

ggutoski commented 3 years ago

All that remains is to delete this cruft: https://github.com/axelarnetwork/tofn/blob/8293d14c92cb1866610af5f5cea4c5e7983de2d1/src/protocol/mod.rs#L13-L23 Closing this issue.