Versions in this module Expand all Collapse all v1 v1.0.1 Dec 19, 2023 Changes in this version + const CoeffIdMinusOne + const CoeffIdMinusTwo + const CoeffIdOne + const CoeffIdTwo + const CoeffIdZero + const CommitmentDst + func SerializeCommitment(privateCommitment []byte, publicCommitted []*big.Int, fieldByteLen int) []byte + type Blueprint interface + CalldataSize func() int + NbConstraints func() int + NbOutputs func(inst Instruction) int + UpdateInstructionTree func(inst Instruction, tree InstructionTree) Level + type BlueprintGenericHint struct + func (b *BlueprintGenericHint) CalldataSize() int + func (b *BlueprintGenericHint) CompressHint(h HintMapping, to *[]uint32) + func (b *BlueprintGenericHint) DecompressHint(h *HintMapping, inst Instruction) + func (b *BlueprintGenericHint) NbConstraints() int + func (b *BlueprintGenericHint) NbOutputs(inst Instruction) int + func (b *BlueprintGenericHint) UpdateInstructionTree(inst Instruction, tree InstructionTree) Level + type BlueprintGenericR1C struct + func (b *BlueprintGenericR1C) CalldataSize() int + func (b *BlueprintGenericR1C) CompressR1C(c *R1C, to *[]uint32) + func (b *BlueprintGenericR1C) DecompressR1C(c *R1C, inst Instruction) + func (b *BlueprintGenericR1C) NbConstraints() int + func (b *BlueprintGenericR1C) NbOutputs(inst Instruction) int + func (b *BlueprintGenericR1C) UpdateInstructionTree(inst Instruction, tree InstructionTree) Level + type BlueprintGenericSparseR1C struct + func (b *BlueprintGenericSparseR1C) CalldataSize() int + func (b *BlueprintGenericSparseR1C) CompressSparseR1C(c *SparseR1C, to *[]uint32) + func (b *BlueprintGenericSparseR1C) DecompressSparseR1C(c *SparseR1C, inst Instruction) + func (b *BlueprintGenericSparseR1C) NbConstraints() int + func (b *BlueprintGenericSparseR1C) NbOutputs(inst Instruction) int + func (b *BlueprintGenericSparseR1C) Solve(s Solver, inst Instruction) error + func (b *BlueprintGenericSparseR1C) UpdateInstructionTree(inst Instruction, tree InstructionTree) Level + type BlueprintHint interface + CompressHint func(h HintMapping, to *[]uint32) + DecompressHint func(h *HintMapping, instruction Instruction) + type BlueprintID uint32 + type BlueprintLookupHint struct + EntriesCalldata []uint32 + func (b *BlueprintLookupHint) CalldataSize() int + func (b *BlueprintLookupHint) NbConstraints() int + func (b *BlueprintLookupHint) NbOutputs(inst Instruction) int + func (b *BlueprintLookupHint) Reset() + func (b *BlueprintLookupHint) Solve(s Solver, inst Instruction) error + func (b *BlueprintLookupHint) UpdateInstructionTree(inst Instruction, tree InstructionTree) Level + type BlueprintR1C interface + CompressR1C func(c *R1C, to *[]uint32) + DecompressR1C func(into *R1C, instruction Instruction) + type BlueprintSolvable interface + Solve func(s Solver, instruction Instruction) error + type BlueprintSparseR1C interface + CompressSparseR1C func(c *SparseR1C, to *[]uint32) + DecompressSparseR1C func(into *SparseR1C, instruction Instruction) + type BlueprintSparseR1CAdd struct + func (b *BlueprintSparseR1CAdd) CalldataSize() int + func (b *BlueprintSparseR1CAdd) CompressSparseR1C(c *SparseR1C, to *[]uint32) + func (b *BlueprintSparseR1CAdd) DecompressSparseR1C(c *SparseR1C, inst Instruction) + func (b *BlueprintSparseR1CAdd) NbConstraints() int + func (b *BlueprintSparseR1CAdd) NbOutputs(inst Instruction) int + func (b *BlueprintSparseR1CAdd) UpdateInstructionTree(inst Instruction, tree InstructionTree) Level + func (blueprint *BlueprintSparseR1CAdd) Solve(s Solver, inst Instruction) error + type BlueprintSparseR1CBool struct + func (b *BlueprintSparseR1CBool) CalldataSize() int + func (b *BlueprintSparseR1CBool) CompressSparseR1C(c *SparseR1C, to *[]uint32) + func (b *BlueprintSparseR1CBool) DecompressSparseR1C(c *SparseR1C, inst Instruction) + func (b *BlueprintSparseR1CBool) NbConstraints() int + func (b *BlueprintSparseR1CBool) NbOutputs(inst Instruction) int + func (b *BlueprintSparseR1CBool) UpdateInstructionTree(inst Instruction, tree InstructionTree) Level + func (blueprint *BlueprintSparseR1CBool) Solve(s Solver, inst Instruction) error + type BlueprintSparseR1CMul struct + func (b *BlueprintSparseR1CMul) CalldataSize() int + func (b *BlueprintSparseR1CMul) CompressSparseR1C(c *SparseR1C, to *[]uint32) + func (b *BlueprintSparseR1CMul) DecompressSparseR1C(c *SparseR1C, inst Instruction) + func (b *BlueprintSparseR1CMul) NbConstraints() int + func (b *BlueprintSparseR1CMul) NbOutputs(inst Instruction) int + func (b *BlueprintSparseR1CMul) Solve(s Solver, inst Instruction) error + func (b *BlueprintSparseR1CMul) UpdateInstructionTree(inst Instruction, tree InstructionTree) Level + type BlueprintStateful interface + Reset func() + type Commitment interface + type CommitmentConstraint uint32 + const COMMITMENT + const COMMITTED + const NOT + type Commitments interface + CommitmentIndexes func() []int + func NewCommitments(t SystemType) Commitments + type Compressible interface + Compress func(to *[]uint32) + type ConstraintSystem interface + AddCoeff func(coeff Element) uint32 + AddCommitment func(c Commitment) error + AddGkr func(gkr GkrInfo) error + AddInternalVariable func() int + AddLog func(l LogEntry) + AddPublicVariable func(name string) int + AddSecretVariable func(name string) int + AddSolverHint func(f solver.Hint, id solver.HintID, input []LinearExpression, nbOutput int) (internalVariables []int, err error) + AttachDebugInfo func(debugInfo DebugInfo, constraintID []int) + CheckUnconstrainedWires func() error + Field func() *big.Int + FieldBitLen func() int + GetCoefficient func(i int) Element + GetCommitments func() Commitments + GetInstruction func(int) Instruction + GetNbCoefficients func() int + GetNbConstraints func() int + GetNbInstructions func() int + GetNbInternalVariables func() int + GetNbPublicVariables func() int + GetNbSecretVariables func() int + GetNbVariables func() (internal, secret, public int) + IsSolved func(witness witness.Witness, opts ...solver.Option) error + MakeTerm func(coeff Element, variableID int) Term + NewDebugInfo func(errName string, i ...interface{}) DebugInfo + Solve func(witness witness.Witness, opts ...solver.Option) (any, error) + type CustomizableSystem interface + AddBlueprint func(b Blueprint) BlueprintID + AddInstruction func(bID BlueprintID, calldata []uint32) []uint32 + type DebugInfo LogEntry + type Element [6]uint64 + func (z *Element) Bytes() [48]byte + func (z *Element) IsZero() bool + func (z *Element) SetBytes(b [48]byte) + type Field interface + Add func(a, b Element) Element + FromInterface func(interface{}) Element + Inverse func(a Element) (Element, bool) + IsOne func(Element) bool + Mul func(a, b Element) Element + Neg func(a Element) Element + One func() Element + String func(Element) string + Sub func(a, b Element) Element + ToBigInt func(Element) *big.Int + Uint64 func(Element) (uint64, bool) + type GkrCircuit []GkrWire + func (c GkrCircuit) Chunks(nbInstances int) []int + type GkrInfo struct + Circuit GkrCircuit + HashName string + MaxNIns int + NbInstances int + ProveHintID solver.HintID + SolveHintID solver.HintID + func (d *GkrInfo) AssignmentOffsets() []int + func (d *GkrInfo) Compile(nbInstances int) (GkrPermutations, error) + func (d *GkrInfo) Is() bool + func (d *GkrInfo) NewInputVariable() GkrVariable + type GkrPermutations struct + InstancesPermutation []int + SortedInstances []int + SortedWires []int + WiresPermutation []int + type GkrVariable int + type GkrWire struct + Dependencies []InputDependency + Gate string + Inputs []int + NbUniqueOutputs int + func (w GkrWire) IsInput() bool + func (w GkrWire) IsOutput() bool + type Groth16Commitment struct + CommitmentIndex int + NbPublicCommitted int + PrivateCommitted []int + PublicAndCommitmentCommitted []int + func (c Groth16Commitment) GetCommitmentCommitted() []int + func (c Groth16Commitment) GetPublicCommitted() []int + type Groth16Commitments []Groth16Commitment + func (c Groth16Commitments) CommitmentIndexes() []int + func (c Groth16Commitments) GetPrivateCommitted() [][]int + func (c Groth16Commitments) GetPublicAndCommitmentCommitted(committedTranslationList []int, offset int) [][]int + type HintMapping struct + HintID solver.HintID + Inputs []LinearExpression + OutputRange struct{ ... } + type InputDependency struct + InputInstance int + OutputInstance int + OutputWire int + type Instruction struct + Calldata []uint32 + ConstraintOffset uint32 + WireOffset uint32 + type InstructionTree interface + GetWireLevel func(wire uint32) Level + HasWire func(wire uint32) bool + InsertWire func(wire uint32, level Level) + type Level int + const LevelUnset + type LinearExpression []Term + func (l LinearExpression) Clone() LinearExpression + func (l LinearExpression) Compress(to *[]uint32) + func (l LinearExpression) String(r Resolver) string + type LogEntry struct + Caller string + Format string + Stack []int + ToResolve []LinearExpression + func (l *LogEntry) WriteVariable(le LinearExpression, sbb *strings.Builder) + type PackedInstruction struct + BlueprintID BlueprintID + ConstraintOffset uint32 + StartCallData uint64 + WireOffset uint32 + func (pi PackedInstruction) Unpack(cs *System) Instruction + type PlonkCommitment struct + CommitmentIndex int + Committed []int + type PlonkCommitments []PlonkCommitment + func (c PlonkCommitments) CommitmentIndexes() []int + type R1C struct + L LinearExpression + O LinearExpression + R LinearExpression + func (r1c *R1C) String(r Resolver) string + type R1CIterator struct + func (it *R1CIterator) Next() *R1C + type R1CS interface + AddR1C func(r1c R1C, bID BlueprintID) int + GetR1CIterator func() R1CIterator + GetR1Cs func() []R1C + type Resolver interface + CoeffToString func(coeffID int) string + VariableToString func(variableID int) string + type Solver interface + GetCoeff func(cID uint32) Element + GetValue func(cID, vID uint32) Element + IsSolved func(vID uint32) bool + Read func(calldata []uint32) (Element, int) + SetValue func(vID uint32, f Element) + type SparseR1C struct + Commitment CommitmentConstraint + QC uint32 + QL uint32 + QM uint32 + QO uint32 + QR uint32 + XA uint32 + XB uint32 + XC uint32 + func (c *SparseR1C) Clear() + func (c *SparseR1C) String(r Resolver) string + type SparseR1CIterator struct + func (it *SparseR1CIterator) Next() *SparseR1C + type SparseR1CS interface + AddSparseR1C func(c SparseR1C, bID BlueprintID) int + GetSparseR1CIterator func() SparseR1CIterator + GetSparseR1Cs func() []SparseR1C + type StringBuilder struct + func NewStringBuilder(r Resolver) *StringBuilder + func (sbb *StringBuilder) WriteLinearExpression(l LinearExpression) + func (sbb *StringBuilder) WriteTerm(t Term) + type System struct + Blueprints []Blueprint + CallData []uint32 + CommitmentInfo Commitments + DebugInfo []LogEntry + GkrInfo GkrInfo + GnarkVersion string + Instructions []PackedInstruction + Levels [][]int + Logs []LogEntry + MDebug map[int]int + MHintsDependencies map[solver.HintID]string + NbConstraints int + NbInternalVariables int + Public []string + ScalarField string + Secret []string + SymbolTable debug.SymbolTable + Type SystemType + func NewSystem(scalarField *big.Int, capacity int, t SystemType) System + func (cs *System) AddInstruction(bID BlueprintID, calldata []uint32) []uint32 + func (cs *System) AddR1C(c R1C, bID BlueprintID) int + func (cs *System) AddSparseR1C(c SparseR1C, bID BlueprintID) int + func (cs *System) CheckUnconstrainedWires() error + func (cs *System) GetCommitments() Commitments + func (cs *System) GetNbConstraints() int + func (cs *System) GetR1CIterator() R1CIterator + func (cs *System) GetSparseR1CIterator() SparseR1CIterator + func (system *System) AddBlueprint(b Blueprint) BlueprintID + func (system *System) AddCommitment(c Commitment) error + func (system *System) AddGkr(gkr GkrInfo) error + func (system *System) AddInternalVariable() (idx int) + func (system *System) AddLog(l LogEntry) + func (system *System) AddPublicVariable(name string) (idx int) + func (system *System) AddSecretVariable(name string) (idx int) + func (system *System) AddSolverHint(f solver.Hint, id solver.HintID, input []LinearExpression, nbOutput int) (internalVariables []int, err error) + func (system *System) AttachDebugInfo(debugInfo DebugInfo, constraintID []int) + func (system *System) CheckSerializationHeader() error + func (system *System) Field() *big.Int + func (system *System) FieldBitLen() int + func (system *System) GetInstruction(id int) Instruction + func (system *System) GetNbInstructions() int + func (system *System) GetNbInternalVariables() int + func (system *System) GetNbPublicVariables() int + func (system *System) GetNbSecretVariables() int + func (system *System) GetNbVariables() (internal, secret, public int) + func (system *System) GetWireLevel(wireID uint32) Level + func (system *System) HasWire(wireID uint32) bool + func (system *System) InsertWire(wireID uint32, level Level) + func (system *System) NewDebugInfo(errName string, i ...interface{}) DebugInfo + func (system *System) VariableToString(vID int) string + type SystemType uint16 + const SystemR1CS + const SystemSparseR1CS + const SystemUnknown + type Term struct + CID uint32 + VID uint32 + func (t *Term) CoeffID() int + func (t *Term) IsConstant() bool + func (t *Term) MarkConstant() + func (t *Term) WireID() int + func (t Term) Compress(to *[]uint32) + func (t Term) String(r Resolver) string