You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Have access to the salt s and vote tally commitment c, which should be retrievable on-chain from m
Have access to the full vote tally r. Assume that the coordinator gives them this data off-chain.
Generate a Merkle proof: proof = genMerkleProof(n, r)
Show that hash(proof.root, s) == c
Show that genMerkleRoot(proof.elements, proof.indices) == proof.root
The text was updated successfully, but these errors were encountered:
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 contractm
, they should be able to do the following:s
and vote tally commitmentc
, which should be retrievable on-chain fromm
r
. Assume that the coordinator gives them this data off-chain.proof = genMerkleProof(n, r)
hash(proof.root, s) == c
genMerkleRoot(proof.elements, proof.indices) == proof.root
The text was updated successfully, but these errors were encountered: