aleo-setup icon indicating copy to clipboard operation
aleo-setup copied to clipboard

Refactor Participant enum to contain structs

Open kellpossible opened this issue 4 years ago • 1 comments

Currently there are many methods which interact with participants of only Participant::Contributor or Participant::Verifier. They are not statically type-safe (when they could be), and realistically require runtime validation of input/output. It would be better to refactor this enum to contain a Contributor struct and a Verifier struct, and all methods which pertain specifically to that type of participant to accept or return only that type. This would improve the clarity of many api's spread throughout the phase1-coordinator codebase, and reduce the chance of a mistake resulting in a runtime error.

kellpossible avatar Apr 06 '21 08:04 kellpossible

This is a big refactor, but I think it will be very helpful if we intend to maintain this software going into the future.

kellpossible avatar Apr 09 '21 03:04 kellpossible