Documentation
¶
Index ¶
- func CountMultiplicityStep(ins []expr.Expr, outs []string, t trace.Trace, _ *Program, proof *proof.Proof, ...) error
- func CountWeightedMultiplicityStep(ins []expr.Expr, outs []string, t trace.Trace, _ *Program, proof *proof.Proof, ...) error
- func ExposeEntriesStep(ins []expr.Expr, outs []string, t trace.Trace, prog *Program, ...) error
- func ExposeIthValue(ins []expr.Expr, outs []string, t trace.Trace, pg *Program, proof *proof.Proof, ...) error
- func ExposeRelativeIthValueStep(ins []expr.Expr, outs []string, t trace.Trace, pg *Program, proof *proof.Proof, ...) error
- func FSStep(ins []expr.Expr, outs []string, t trace.Trace, _ *Program, proof *proof.Proof, ...) error
- func GrandProductStep(ins []expr.Expr, outs []string, t trace.Trace, prog *Program, ...) error
- func LogUpStep(ins []expr.Expr, outs []string, t trace.Trace, prog *Program, ...) error
- type Builder
- func (b *Builder) AddCountMultiplicityStep(S, T []expr.Expr, output string)
- func (b *Builder) AddCountWeightedMultiplicityStep(selS, S, T []expr.Expr, output string)
- func (b *Builder) AddExposeIthValueStep(module string, E expr.Expr, out string, pos int)
- func (b *Builder) AddExposeLastEntryStep(module string, E expr.Expr, out string)
- func (b *Builder) AddExposeRelativeIthValueStep(module string, E expr.Expr, out string, pos int)
- func (b *Builder) AddExposeValuesStep(module string, E expr.Expr, selector, out string, idx []int)
- func (b *Builder) AddFiatShamirStep(E []expr.Expr, out string)
- func (b *Builder) AddGrandProductStep(module string, N, D expr.Expr, output string)
- func (b *Builder) AddLogupBus(cm LogupBus)
- func (b *Builder) AddLogupStep(module string, E, M expr.Expr, output string)
- func (b *Builder) AddModule(m Module)
- func (b *Builder) AssertEqualAt(module string, A, B expr.Expr, i int) error
- func (b *Builder) AssertZero(module string, relation expr.Expr) error
- type CMCtx
- type CMWCtx
- type Column
- type ColumnRef
- type CompiledModule
- type ExposeEntriesCtx
- type ExposeIthValueCtx
- type ExposeRelativeIthValueCtx
- type ExposedEntry
- type ExposedValue
- type FSCtx
- type GPCtx
- type Gen
- type LagrangeGen
- type LagrangeRelativeGen
- type LogUpCtx
- type LogupBus
- type Module
- func (m *Module) AssertEqualAt(A, B expr.Expr, i int)
- func (m *Module) AssertEqualFirstEntry(A, B expr.Expr)
- func (m *Module) AssertEqualLastEntry(A, B expr.Expr)
- func (m *Module) AssertEqualRelativeAt(A, B expr.Expr, i int)
- func (m *Module) AssertZero(relation expr.Expr)
- func (m *Module) AssertZeroAt(relation expr.Expr, i ...int)
- func (m *Module) AssertZeroExceptAt(relation expr.Expr, i ...int)
- func (m *Module) AssertZeroExceptLastEntry(relation expr.Expr)
- func (m *Module) AssertZeroFirstEntry(relation expr.Expr)
- func (m *Module) AssertZeroLastEntry(relation expr.Expr)
- func (m *Module) AssertZeroRelativeAt(relation expr.Expr, i ...int)
- func (m *Module) LagrangeCol(i int) expr.Expr
- func (m *Module) LagrangeColRelative(i int) expr.Expr
- func (m *Module) NameIthIDSupport(i int) string
- type Output
- type PermutationGen
- type Program
- type Proof
- type ProverStep
- type RangeColumnGen
- type Relation
- type SelectorGen
- type Step
- type StepContext
- type Table
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountMultiplicityStep ¶
func CountMultiplicityStep(ins []expr.Expr, outs []string, t trace.Trace, _ *Program, proof *proof.Proof, mu *sync.Mutex, ctx StepContext) error
CountUnionMultiplicityStep computes the running sum M/E where ins[0] = S (values), ins[1] = T (table), ins[2] = Sel (selector)
func CountWeightedMultiplicityStep ¶
func CountWeightedMultiplicityStep(ins []expr.Expr, outs []string, t trace.Trace, _ *Program, proof *proof.Proof, mu *sync.Mutex, ctx StepContext) error
CountWeightedMultiplicityStep computes the running sum M/E where ins: [ selS || S || T]
func ExposeEntriesStep ¶
func ExposeIthValue ¶
func ExposeIthValue(ins []expr.Expr, outs []string, t trace.Trace, pg *Program, proof *proof.Proof, mu *sync.Mutex, ctx StepContext) error
ExposeIthValue adds a constraint Lagrange_pos * (expr - expr[pos]), and stores expr[pos] in the proof so the verifier has access to it
func ExposeRelativeIthValueStep ¶
func ExposeRelativeIthValueStep(ins []expr.Expr, outs []string, t trace.Trace, pg *Program, proof *proof.Proof, mu *sync.Mutex, ctx StepContext) error
ExposeRelativeIthValueStep adds a constraint Lagrange_pos * (expr - expr[pos]), and stores expr[pos] in the proof so the verifier has access to it
Types ¶
type Builder ¶
type Builder struct {
Modules map[string]*Module
LogupBus []LogupBus
Steps []ProverStep
}
func NewBuilder ¶
func NewBuilder() Builder
func (*Builder) AddCountMultiplicityStep ¶
S ⊂ T, the ouptut is in T's module
func (*Builder) AddCountWeightedMultiplicityStep ¶
S ⊂ T, the ouptut is in T's module
func (*Builder) AddExposeIthValueStep ¶
AddExposeIthValueStep adds a constraint Lagrange_pos * (expr - expr[pos]), and stores expr[pos] in the proof so the verifier has access to it the 1 entry column expr[pos] is registered in the trace
func (*Builder) AddExposeLastEntryStep ¶
AddExposeLastEntryStep syntactic sugar for AddExposeRelativeIthValueStep(module, E, out, 0)
func (*Builder) AddExposeRelativeIthValueStep ¶
AddExposeIthValue adds a constraint Lagrange_pos * (expr - expr[pos]), and stores expr[pos] in the proof so the verifier has access to it the 1 entry column expr[pos] is registered in the trace
func (*Builder) AddExposeValuesStep ¶
func (*Builder) AddGrandProductStep ¶
func (*Builder) AddLogupBus ¶
func (*Builder) AddLogupStep ¶
AddLogupStep register the action of computing the column interpolating the running sum \Sigma_j<=i M[i]/E[i]
func (*Builder) AssertEqualAt ¶
type ColumnRef ¶
ColumnRef identifies a column by its bare name and the module it belongs to. The module name is needed to recover the column's polynomial size from program.Modules, which is required for multi-degree FRI (commitments are grouped per size).
type CompiledModule ¶
type CompiledModule struct {
Name string
GenCol []Gen // public columns generator (lagrange, permutation columns, etc)
N int
VanishingRelation *dag.DAG
D *fft.Domain
}
func (*CompiledModule) NameIthIDSupport ¶
func (m *CompiledModule) NameIthIDSupport(i int) string
NameIthIDSupport returns the name of the i-th chunk of the support of a permutation (common to every permutation within a CompiledModule)
type ExposeEntriesCtx ¶
type ExposeIthValueCtx ¶
type ExposedEntry ¶
type ExposedEntry = proof.ExposedEntry
type ExposedValue ¶
type ExposedValue = proof.ExposedValue
type LagrangeGen ¶
type LagrangeGen struct {
// contains filtered or unexported fields
}
func (LagrangeGen) Gen ¶
func (p LagrangeGen) Gen(t trace.Trace, m *CompiledModule) error
type LagrangeRelativeGen ¶
type LagrangeRelativeGen struct {
// contains filtered or unexported fields
}
func (LagrangeRelativeGen) Gen ¶
func (p LagrangeRelativeGen) Gen(t trace.Trace, m *CompiledModule) error
type LogupBus ¶
func NewLogupBus ¶
type Module ¶
type Module struct {
Name string
Relations []Relation
GenCol []Gen // public columns generator (lagrange, permutation columns, selectors, etc)
N int
}
func (*Module) AssertEqualFirstEntry ¶
func (*Module) AssertEqualLastEntry ¶
func (*Module) AssertEqualRelativeAt ¶
asserts that A[m.N-1-i]=B[m.N-1-i]
func (*Module) AssertZero ¶
func (*Module) AssertZeroExceptAt ¶
func (*Module) AssertZeroExceptLastEntry ¶
func (*Module) AssertZeroFirstEntry ¶
func (*Module) AssertZeroLastEntry ¶
func (*Module) AssertZeroRelativeAt ¶
func (*Module) NameIthIDSupport ¶
NameIthIDSupport returns the name of the i-th chunk of the support of a permutation (common to every permutation within a module)
type PermutationGen ¶
func NewPermutationGen ¶
func NewPermutationGen(S []int64, permutationName string) PermutationGen
func (PermutationGen) Gen ¶
func (p PermutationGen) Gen(t trace.Trace, m *CompiledModule) error
func (PermutationGen) NameIthPermutationChunk ¶
func (p PermutationGen) NameIthPermutationChunk(i int) string
type Program ¶
type Program struct {
Modules map[string]CompiledModule
SetupColumns []ColumnRef // setup columns, precommitted (ex: ql, qr, etc in plonk)
FScolumnsDependencies [][]ColumnRef // one []ColumnRef per FS round
ColumnFields map[string]field.Kind
LogupBus []LogupBus
Steps [][]ProverStep
}
Program the double slice [][] means that the steps are scheduled
type ProverStep ¶
type ProverStep struct {
Ctx StepContext
Ins []expr.Expr
Outs []string
Step Step
}
func NewProverStep ¶
func NewProverStep(ins []expr.Expr, outs []string, step Step, ctx StepContext) ProverStep
type RangeColumnGen ¶
type RangeColumnGen struct {
Bound uint64
}
func (RangeColumnGen) Gen ¶
func (rc RangeColumnGen) Gen(t trace.Trace, m *CompiledModule) error
type SelectorGen ¶
func (SelectorGen) Gen ¶
func (s SelectorGen) Gen(t trace.Trace, m *CompiledModule) error
type StepContext ¶
type StepContext any