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

Add unique set type for inputs #483

Open
3 tasks
marsella opened this issue Aug 25, 2023 · 0 comments
Open
3 tasks

Add unique set type for inputs #483

marsella opened this issue Aug 25, 2023 · 0 comments

Comments

@marsella
Copy link

Many of our constructed input / output types need to be unique sets. For example:

  • keygen outputs include a list of public key shares with unique participant IDs
  • auxinfo outputs include a list of public aux info with unique participant IDs

Note that the uniqueness property is on the PIDs, not the data itself. Theoretically, it's possible and legal for two parties to randomly select e.g. identical public key shares (although it's incredibly unlikely). On the flip side, if we have a dozen unique pieces of data but they all belong to the same PID, we have a problem.

Currently, these are typed as Vec<_>s and upon construction, we check that the uniqueness properties hold. An alternate approach could define a UniqueSet<T> type that checks the appropriate uniqueness property and maybe can be constructed easily from any iterable.

Completion criteria

If appropriate, this can be broken into multiple issues

  • Design a useful API for these types, considering the currently limited set of use cases and how to make it relatively misuse resistant for the user
  • Implement and incorporate into input types
  • Determine whether there are other scenarios where we might use the unique set type.
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

No branches or pull requests

1 participant