-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feature/priority voting #61
Conversation
Issue regarding the priority votes is resolved as the handling of multioption voting
In store and voting modules
After doing the merge some other votes types were failing in the mixcrip.py file. Added new test after merge to check compatibility between white voting and priority
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesYou may notice some variations in coverage metrics with the latest Coverage engine update. For more details, visit the documentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks fine and working. Good job!
The purpose of this pull request is to introduce the functionality for a new priority-based voting system in Decide. Before executing the application or conducting tests, please follow these steps:
Given that the frontend interface for this feature hasn't been developed yet, testing will be performed through unit tests.
Key Changes and Concepts:
Used the multiple option voting structure: This new priority voting model is integrated in the current 'question_type' attribute.
Frontend Vote Format: For single-option voting, the format of a vote from the frontend is: vote: { "a": int, "b": int }. In contrast, for priority voting, the format is: vote: [ { "a": int, "b": int, "p": int }, ...]. The priority vote is structured as a list of dictionaries to ensure encrypted votes with chosen options reach the backend for decryption.
Implementation of the New Model in the Mixnet: Previous models (e.g., simple voting or multi-option voting) only consist of 'a' and 'b' parameters, while the priority voting requires an additional parameter ('p') to store the priority of the voted option.
White voting: Currently, it is not feasible to select white voting alongside priority voting due to the inherent contradiction. Allowing a combination of white voting with priority voting would undermine the purpose of the priority voting system. As such, it remains incompatible as it contradicts the nature of prioritizing and ranking options.
If you have any suggestions on how to enhance this feature or if you encounter a bug, please let me know!