voteverifiertest

package
v0.0.0-...-9fbd910 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2025 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VoteVerifierTestResults

type VoteVerifierTestResults struct {
	EncryptionPubKey [2]*big.Int
	ProcessID        []byte
	CensusRoot       *big.Int
	Nullifiers       []*big.Int
	Commitments      []*big.Int
	EncryptedBallots [][ballottest.NFields][2][2]*big.Int
}

VoteVerifierTestResults struct includes relevant data after VerifyVoteCircuit inputs generation

func VoteVerifierInputsForTest

func VoteVerifierInputsForTest(votersData []VoterTestData, processId []byte) (
	*VoteVerifierTestResults, voteverifier.VerifyVoteCircuit,
	[]voteverifier.VerifyVoteCircuit, error,
)

VoteVerifierInputsForTest returns the VoteVerifierTestResults, the placeholder and the assigments for a VerifyVoteCircuit including the provided voters. If processId is nil, it will be randomly generated. If something fails it returns an error.

type VoterTestData

type VoterTestData struct {
	PrivKey *ecdsa.PrivateKey
	PubKey  ecdsa.PublicKey
	Address common.Address
}

VoterTestData struct includes the information required to generate the test inputs for the VerifyVoteCircuit.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL