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

feat: adding delegated voting using notes #24

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

wei3erHase
Copy link
Contributor

@wei3erHase wei3erHase commented Dec 11, 2024

Created a PR adding a feature, not to be merged, or maybe, but to try to make a clear usage of custom notes, and how they can be used in this common implementation.

As voting, delegating will create the nullifier that avoids a msg_sender() from voting twice (not the best security against sybil attack, but well), and create a custom note, for the delegatee to use it and vote in the name of the user.

There are some features that would make it future complete and i'm researching how to implement them:

  • test: create a test in JS, in which the delegatee actually sees the note creation from a secondary PXE (would need some orientation with this)
  • doubt: is the randomness field in the note needed to avoid privacy leaking?
  • feature: allow a delegator to batch vote delegations (doesn't seem that hard)

overall, discovered that .nr tests are amazingly fast and quite easy to setup, fear unlocked

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