Skip to main content

vote_commitment_hash

Function vote_commitment_hash 

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

Compute the vote commitment leaf hash (arity-5 Poseidon).

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

This must produce identical output to orchard::vote_proof::vote_commitment_hash.