Skip to main content

vote_commitment_hash

Function vote_commitment_hash 

Source
pub fn vote_commitment_hash(
    voting_round_id: Base,
    shares_hash: Base,
    proposal_id: Base,
    vote_decision: Base,
) -> Base
Expand description

Out-of-circuit vote commitment hash.

Computes:

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

Used by builders and tests to compute the expected vote commitment. Must produce identical output to the in-circuit gadget.