Skip to main content
Version: v3.x

MACI Poll Circuits

Repo link

PollJoining

Users need to provide a valid proof to the Poll smart contract to join a poll, allowing to vote on it. The circuit ensures that they signup to all polls with the same MACI public key, as well as that they can prove being included in MACI's state tree.

Parameters

#ParameterDescription
0State tree depthAllows (2n)(2^{n}) signups.

Inputs

Input signalDescription
privateKeyThe user's private key
pollPublicKeyThe poll's public key
siblingsThe siblings for the merkle tree inclusion proof
indicesThe indices for the merkle tree inclusion proof
nullifierThe nullifier
stateRootThe MACI state tree root
actualStateTreeDepthThe actual tree depth (might be less or equal to stateTreeDepth), used by the LeanIMT structure
pollIdThe poll id

PollJoined

Users will use this circuit to anonymously prove that they joined a poll. This can be used to authenticate to the relayer service, to reduce spam.

Parameters

#ParameterDescription
0State tree depthAllows (2n)(2^{n}) signups.

Inputs

Input signalDescription
privateKeyThe user's private key
voiceCreditsBalanceThe user's initial voice credits balance
pathElementsThe path elements for the merkle tree inclusion proof
pathIndicesThe path indices for the merkle tree inclusion proof
stateRootThe MACI state tree root
actualStateTreeDepthThe actual tree depth (might be less or equal to stateTreeDepth), used by the LeanIMT structure