statetransitiontest

package
v0.0.0-...-03d24db Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateWitnesses

func GenerateWitnesses(o *state.State) (*statetransition.Circuit, error)

Types

type StateTransitionTestResults

type StateTransitionTestResults struct {
	ProcessId             *big.Int
	CensusRoot            *big.Int
	EncryptionPubKey      circuits.EncryptionKey[*big.Int]
	Nullifiers            []*big.Int
	Commitments           []*big.Int
	Addresses             []*big.Int
	EncryptedBallots      []elgamal.Ballot
	PlainEncryptedBallots []*big.Int
}

StateTransitionTestResults struct includes relevant data after StateTransitionCircuit inputs generation

func StateTransitionInputsForTest

func StateTransitionInputsForTest(processId []byte, nValidVoters int) (
	*StateTransitionTestResults, *statetransition.Circuit, *statetransition.Circuit, error,
)

StateTransitionInputsForTest returns the StateTransitionTestResults, the placeholder and the assigments of a StateTransitionCircuit for the processId provided generating nValidVoters. If something fails it returns an error.

Jump to

Keyboard shortcuts

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