Remove PartyIdx
from high-level API
#40
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
All the high-level API now takes and returns the
Verifier
objects that were provided on the creation of a session. Note that the order of theVerifier
array still matters since it has to match the order of shares inKeyShare
(or will match the order in the returnedKeyShare
, for KeyGen protocol).Also this PR attempts to narrow down the errors returned by various high-level methods. The errors we get can fall under the following categories:
LocalError
orError::Local
, and the user code can't really do much with them besides logging them and halting the protocol execution (or the whole application).Error::Provable
(TODO: attach the implicating messages with them) and can be published to prove that a node with a givenVerifier
misbehaved.Error::Proof
when the protocol could identify that an error occurred, but couldn't pinpoint the guilty party. Then some independent observer (or each node) must collect these proofs from each participating node, and at least one of them will be either malformed or not provided, thus pointing at the guilty party.RemoteError
orError::Remote
.