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

[contracts] The ability to verify a tally result on-chain #108

Closed
weijiekoh opened this issue May 27, 2020 · 0 comments
Closed

[contracts] The ability to verify a tally result on-chain #108

weijiekoh opened this issue May 27, 2020 · 0 comments

Comments

@weijiekoh
Copy link
Contributor

Refer to: #91

When a 3rd-party contract wants to trustlessly prove that they know the final vote tally of vote option n from MACI contract m, they should be able to do the following:

  1. Have access to the salt s and vote tally commitment c, which should be retrievable on-chain from m
  2. Have access to the full vote tally r. Assume that the coordinator gives them this data off-chain.
  3. Generate a Merkle proof: proof = genMerkleProof(n, r)
  4. Show that hash(proof.root, s) == c
  5. Show that genMerkleRoot(proof.elements, proof.indices) == proof.root
@weijiekoh weijiekoh created this issue from a note in Minimum Viable MACI (Backlog) May 27, 2020
@weijiekoh weijiekoh moved this from Backlog to In progress in Minimum Viable MACI Jun 8, 2020
@weijiekoh weijiekoh moved this from In progress to Needs review in Minimum Viable MACI Jun 9, 2020
@weijiekoh weijiekoh moved this from Needs review to Done in Minimum Viable MACI Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

1 participant