Expand description
R1CS Parser for Circom binary format
Parses the .r1cs file format produced by the Circom compiler.
This allows us to replay constraints during proof generation.
§File Format
The R1CS binary format consists of:
- Header with magic number “r1cs”
- Sections for header info, constraints, and wire mappings
§Reference
https://github.com/iden3/r1csfile/blob/master/doc/r1cs_bin_format.md
Structs§
- Constraint
- A single R1CS constraint: A * B = C Where A, B, C are linear combinations
- Linear
Combination - A linear combination: sum of (coefficient * wire)
- R1CS
- Parsed R1CS file
- Term
- A term in a linear combination: coefficient * wire