Expand description
Includes boilerplate for creating a GKR circuit, i.e. creating a transcript, proving, verifying, etc.
Functionsยง
- get_
circuit_ description_ hash_ as_ field_ elems - Returns an equivalent set of field elements to be absorbed into a transcript, given a circuit description and the type of hash function to be used.
- prove_
circuit_ ๐internal - Generates a GKR proof (in the form of a [TranscriptReader<F, Tr>]) and a
[ProofConfig] (to be used in verification) for the given
ProvableCircuit<F>. - prove_
circuit_ with_ runtime_ optimized_ config - Wrapper around
prove_circuit_internal()which uses a runtime-optimized prover config. - test_
circuit_ ๐internal - Function which instantiates a circuit description with the given inputs and precommits and both attempts to both prove and verify said circuit.
- test_
circuit_ with_ config - Function which calls
test_circuit_internalwith the appropriate expected prover/verifier config. - test_
circuit_ with_ memory_ optimized_ config - Function which calls
test_circuit_internalwith a memory-optimized default. - test_
circuit_ with_ runtime_ optimized_ config - Function which calls
test_circuit_internalwith the appropriate expected prover/verifier config. - verify_
circuit_ ๐internal - Takes in a verifier-ready
VerifiableCircuit<F>, proof config [ProofConfig] and GKR proof in the form of a [TranscriptReader<F, Tr>], and attempts to verify the proof against the circuit. - verify_
circuit_ with_ proof_ config - Wrapper around
verify_circuit_internal()which uses a verifier config corresponding to the provided prover config. - write_
circuit_ description_ to_ file - Writes the circuit description for the provided GKRCircuitDescription
to the
circuit_description_pathspecified, in JSON format.