Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove PartyIdx from high-level API #40

Merged
merged 2 commits into from
Oct 25, 2023
Merged

Remove PartyIdx from high-level API #40

merged 2 commits into from
Oct 25, 2023

Conversation

fjarri
Copy link
Member

@fjarri fjarri commented Oct 23, 2023

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 the Verifier array still matters since it has to match the order of shares in KeyShare (or will match the order in the returned KeyShare, 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:

  • Usage errors or library bugs. These are returned as LocalError or Error::Local, and the user code can't really do much with them besides logging them and halting the protocol execution (or the whole application).
  • Provable faults of a single party (e.g. a signed malformed message or an invalid proof within a message). These are returned as Error::Provable (TODO: attach the implicating messages with them) and can be published to prove that a node with a given Verifier misbehaved.
  • Proofs of the correct execution of a protocol. These are returned as 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.
  • Unprovable faults of a remote node, e.g. invalid signature or a duplicate message. These can have more or less weight depending on the guarantees of the message delivery channel, so the course of action is chosen by the user code. These are returned as RemoteError or Error::Remote.

@vercel
Copy link

vercel bot commented Oct 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
synedrion ✅ Ready (Inspect) Visit Preview Oct 23, 2023 6:36am

@fjarri fjarri merged commit 012a715 into master Oct 25, 2023
5 checks passed
@fjarri fjarri deleted the hide-idx branch October 25, 2023 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant