Skip to main content
Version: v3.x

IVerifyingKeysRegistry

VerifyingKeysRegistry interface

SetVerifyingKeysBatchArgs

struct SetVerifyingKeysBatchArgs {
uint256 stateTreeDepth;
uint256 pollStateTreeDepth;
uint256 tallyProcessingStateTreeDepth;
uint256 voteOptionTreeDepth;
uint8 messageBatchSize;
enum DomainObjs.Mode[] modes;
struct SnarkCommon.VerifyingKey pollJoiningVerifyingKey;
struct SnarkCommon.VerifyingKey pollJoinedVerifyingKey;
struct SnarkCommon.VerifyingKey[] processVerifyingKeys;
struct SnarkCommon.VerifyingKey[] tallyVerifyingKeys;
}

getTallyVerifyingKey

function getTallyVerifyingKey(uint256 _stateTreeDepth, uint256 _intStateTreeDepth, uint256 _voteOptionTreeDepth, enum DomainObjs.Mode _mode) external view returns (struct SnarkCommon.VerifyingKey)

Get the tally verifying key

Parameters

NameTypeDescription
_stateTreeDepthuint256The state tree depth
_intStateTreeDepthuint256The intermediate state tree depth
_voteOptionTreeDepthuint256The vote option tree depth
_modeenum DomainObjs.ModeQV or Non-QV

Return Values

NameTypeDescription
[0]struct SnarkCommon.VerifyingKeyThe verifying key

getProcessVerifyingKey

function getProcessVerifyingKey(uint256 _stateTreeDepth, uint256 _voteOptionTreeDepth, uint8 _messageBatchSize, enum DomainObjs.Mode _mode) external view returns (struct SnarkCommon.VerifyingKey)

Get the process verifying key

Parameters

NameTypeDescription
_stateTreeDepthuint256The state tree depth
_voteOptionTreeDepthuint256The vote option tree depth
_messageBatchSizeuint8The message batch size
_modeenum DomainObjs.ModeQV or Non-QV

Return Values

NameTypeDescription
[0]struct SnarkCommon.VerifyingKeyThe verifying key

getPollJoiningVerifyingKey

function getPollJoiningVerifyingKey(uint256 _stateTreeDepth) external view returns (struct SnarkCommon.VerifyingKey)

Get the poll joining verifying key

Parameters

NameTypeDescription
_stateTreeDepthuint256The state tree depth

Return Values

NameTypeDescription
[0]struct SnarkCommon.VerifyingKeyThe verifying key

getPollJoinedVerifyingKey

function getPollJoinedVerifyingKey(uint256 _stateTreeDepth) external view returns (struct SnarkCommon.VerifyingKey)

Get the poll joined verifying key

Parameters

NameTypeDescription
_stateTreeDepthuint256The state tree depth

Return Values

NameTypeDescription
[0]struct SnarkCommon.VerifyingKeyThe verifying key