irsource

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SerializeRootCircuit

func SerializeRootCircuit(c *RootCircuit) []byte

Types

type Circuit

type Circuit struct {
	Instructions []Instruction
	Constraints  []Constraint
	Outputs      []int
	NumInputs    int
}

type Constraint

type Constraint struct {
	Typ ConstraintType
	Var int
}

type ConstraintType

type ConstraintType = int
const (
	Zero ConstraintType
	NonZero
	Bool
)

type Instruction

type Instruction struct {
	Type        InstructionType
	X           int
	Y           int
	Inputs      []int
	NumOutputs  int
	ExtraId     uint64
	LinCombCoef []constraint.Element
	Const       constraint.Element
}

type InstructionType

type InstructionType = int
const (
	LinComb InstructionType
	Mul
	Div
	BoolBinOp
	IsZero
	Commit
	Hint
	ConstantLike
	SubCircuitCall
	UnconstrainedBinOp
	UnconstrainedSelect
	CustomGate
)

type RootCircuit

type RootCircuit struct {
	NumPublicInputs         int
	ExpectedNumOutputZeroes int
	Circuits                map[uint64]*Circuit
	Field                   field.Field
}

Jump to

Keyboard shortcuts

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