Skip to main content

Module vote_commitment

Module vote_commitment 

Source
Expand description

Vote Commitment integrity gadget.

Shared 5-input Poseidon hash used by both ZKP #2 (vote proof, condition 12) and ZKP #3 (share reveal, condition 2):

vote_commitment = Poseidon(DOMAIN_VC, voting_round_id,
                           shares_hash, proposal_id, vote_decision)

The domain tag bakes into the verification key, preventing malicious provers from substituting VAN commitments for vote commitments in the shared tree.

Constants§

DOMAIN_VC
Domain tag for Vote Commitments.

Functions§

vote_commitment_hash
Out-of-circuit vote commitment hash.
vote_commitment_poseidon
In-circuit vote commitment hash.