Documentation ¶
Index ¶
- func MakeCS(circID circuits.MockCircuitID, scalarField *big.Int) (constraint.ConstraintSystem, error)
- func MakeProof(setup *circuits.Setup, x any, circID circuits.MockCircuitID) string
- func MakeUnsafeSetup(srsProvider circuits.SRSProvider, circID circuits.MockCircuitID, ...) (circuits.Setup, error)
- func NewBuilder(circID circuits.MockCircuitID, scalarField *big.Int) *builder
- type CircuitDummy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeCS ¶
func MakeCS(circID circuits.MockCircuitID, scalarField *big.Int) (constraint.ConstraintSystem, error)
Compiles the circuit for a given circuit ID
func MakeUnsafeSetup ¶
func MakeUnsafeSetup(srsProvider circuits.SRSProvider, circID circuits.MockCircuitID, scalarField *big.Int) (circuits.Setup, error)
Generates a deterministic (and unsafe) setup. Take the circuit ID as an input to "specialize" the circuit. The circID parameter is only meaningful to generate test samples for the smart-contract.
func NewBuilder ¶
func NewBuilder(circID circuits.MockCircuitID, scalarField *big.Int) *builder
Types ¶
type CircuitDummy ¶
type CircuitDummy struct { X frontend.Variable `gnark:",public"` // This relies on the fact that x^5 is a permutation in Fr of the bn254 // curve. X5 frontend.Variable `gnark:",secret"` // Optional field, changes the circuit so that X5 = X^5 + ID. This // functionality allows generated different incompatible versions of the // dummy circuit. ID int `gnark:"-"` }
CircuitDummy, that is verified by only one public input. dummy.CircuitDummy can also be optionally given an ID (0 by default) so that a proof for circuit of ID x will be rejected by the verifier for the circuit of ID y.
func Assign ¶
func Assign(id circuits.MockCircuitID, x_ any) *CircuitDummy
Generates an assignment for the circuit.
Click to show internal directories.
Click to hide internal directories.