Tally
The Tally contract is used during votes tallying and by users to verify the tally results.
TREE_ARITY
uint256 TREE_ARITY
tallyCommitment
uint256 tallyCommitment
The commitment to the tally results. Its initial value is 0, but after the tally of each batch is proven on-chain via a zk-SNARK, it should be updated to:
QV: hash3( hashLeftRight(merkle root of current results, salt0) hashLeftRight(number of spent voice credits, salt1), hashLeftRight(merkle root of the no. of spent voice credits per vote option, salt2) )
Non-QV: hash2( hashLeftRight(merkle root of current results, salt0) hashLeftRight(number of spent voice credits, salt1), )
Where each salt is unique and the merkle roots are of arrays of leaves TREE_ARITY ** voteOptionTreeDepth long.
tallyBatchNum
uint256 tallyBatchNum
sbCommitment
uint256 sbCommitment
verifier
contract IVerifier verifier
vkRegistry
contract IVkRegistry vkRegistry
poll
contract IPoll poll
messageProcessor
contract IMessageProcessor messageProcessor
mode
enum DomainObjs.Mode mode
ProcessingNotComplete
error ProcessingNotComplete()
custom errors
InvalidTallyVotesProof
error InvalidTallyVotesProof()
AllBallotsTallied
error AllBallotsTallied()
NumSignUpsTooLarge
error NumSignUpsTooLarge()
BatchStartIndexTooLarge
error BatchStartIndexTooLarge()
TallyBatchSizeTooLarge
error TallyBatchSizeTooLarge()