testutil

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Weight = 42
)

Variables

This section is empty.

Functions

func BallotMode

func BallotMode() circuits.BallotMode[*big.Int]

func BallotModeInternal

func BallotModeInternal() *types.BallotMode

func BallotModeVar

func BallotModeVar() circuits.BallotMode[frontend.Variable]

func DeterministicAddress

func DeterministicAddress(n uint64) common.Address

func DeterministicProcessID

func DeterministicProcessID(n uint64) types.ProcessID

DeterministicProcessID is a deterministic ProcessID used for testing purposes.

func DeterministicStateRoot

func DeterministicStateRoot(n uint64) *types.BigInt

func FixedProcessID

func FixedProcessID() types.ProcessID

FixedProcessID should be used by all circuit tests to ensure consistent caching and proof reuse between tests.

func GenDeterministicBallotFields

func GenDeterministicBallotFields(seed int64) [params.FieldsPerBallot]*types.BigInt

GenDeterministicBallotFields generates a list of n deterministic fields based on the provided seed for consistent testing and caching.

func RandomAddress

func RandomAddress() common.Address

func RandomCensus

func RandomCensus(origin types.CensusOrigin) *types.Census

func RandomCensusRoot

func RandomCensusRoot() *big.Int

func RandomEncryptionKeys

func RandomEncryptionKeys() (babyjub.PrivateKey, circuits.EncryptionKey[*big.Int])

func RandomEncryptionPubKey

func RandomEncryptionPubKey() circuits.EncryptionKey[*big.Int]

func RandomProcessID

func RandomProcessID() types.ProcessID

func RandomStateRoot

func RandomStateRoot() *types.BigInt

func RandomVoteID

func RandomVoteID() *big.Int

func SepoliaChainID

func SepoliaChainID() uint32

SepoliaChainID returns 11155111 (i.e. Sepolia)

func StateRoot

func StateRoot() *types.BigInt

Types

This section is empty.

Jump to

Keyboard shortcuts

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