verifiercol

package
v0.0.0-...-b1352b5 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertIsPublicCol

func AssertIsPublicCol(comp *wizard.CompiledIOP, col ifaces.Column)

AssertIsPublicCol returns true if the column is public TODO @AlexandreBelling, this function seems at the wrong place in this package. We should consider rework the package organization to make it work in a cleaner manner.

func NewConcatTinyColumns

func NewConcatTinyColumns(
	comp *wizard.CompiledIOP,
	paddedSize int,
	paddingVal field.Element,
	cols ...ifaces.Column,
) ifaces.Column

NewConcatTinyColumns creates a new ConcatTinyColumns. The columns must all have a length of "1"

func NewConstantCol

func NewConstantCol(f field.Element, size int) ifaces.Column

NewConstCol creates a new ConstCol column

func NewFromAccessors

func NewFromAccessors(accessors []ifaces.Accessor, padding field.Element, size int) ifaces.Column

NewFromAccessors instantiates a FromAccessors column from a list of ifaces.Accessor. The column's size must be a power of 2.

You should not pass accessors of type [expressionAsAccessor] as their evaluation within a gnark circuit requires using the frontend.API which we can't access in the context currently.

func NewFromIntVecCoin

func NewFromIntVecCoin(comp *wizard.CompiledIOP, info coin.Info, ops ...FivcOp) ifaces.Column

Construct a new column from a `IntegerVec` coin

func NewFromYs

func NewFromYs(comp *wizard.CompiledIOP, q query.UnivariateEval, ranges []ifaces.ColID) ifaces.Column

Construct a new column from a univariate query and a list of of ifaces.ColID If passed a column that is not part of the query. It will not panic but it will return a zero entry. This is the expected behavior when given a shadow column from the vortex compiler but otherwise this is a bug.

func RightPadZeroToNextPowerOfTwo

func RightPadZeroToNextPowerOfTwo(settings *fromIntVecCoinSettings)

Passes a padding value to the Fivc

Types

type ConstCol

type ConstCol struct {
	F     field.Element
	Size_ int
}

Represents a constant column

func (ConstCol) GetColAssignment

func (cc ConstCol) GetColAssignment(_ ifaces.Runtime) ifaces.ColAssignment

Returns a constant smart-vector

func (ConstCol) GetColAssignmentAt

func (cc ConstCol) GetColAssignmentAt(run ifaces.Runtime, pos int) field.Element

Returns a particular position of the coin value

func (ConstCol) GetColAssignmentGnark

func (cc ConstCol) GetColAssignmentGnark(_ ifaces.GnarkRuntime) []frontend.Variable

Returns the column as a list of gnark constants

func (ConstCol) GetColAssignmentGnarkAt

func (cc ConstCol) GetColAssignmentGnarkAt(run ifaces.GnarkRuntime, pos int) frontend.Variable

Returns a particular position of the coin value

func (ConstCol) GetColID

func (cc ConstCol) GetColID() ifaces.ColID

Returns a generic name from the column. Defined from the coin's.

func (ConstCol) IsComposite

func (cc ConstCol) IsComposite() bool

Since the column is directly defined from the values of a random coin it does not count as a composite column.

func (ConstCol) MustExists

func (cc ConstCol) MustExists()

Always return true

func (ConstCol) Round

func (cc ConstCol) Round() int

Returns the round of definition of the column (always zero) Even though this is more of a convention than a meaningful return value.

func (ConstCol) Size

func (cc ConstCol) Size() int

Returns the size of the column

func (ConstCol) Split

func (cc ConstCol) Split(comp *wizard.CompiledIOP, from, to int) ifaces.Column

Splits the column and return a handle of it

func (ConstCol) String

func (cc ConstCol) String() string

Returns the name of the column.

type ExpandedVerifCol

type ExpandedVerifCol struct {
	Verifiercol VerifierCol
	Expansion   int
}

func (ExpandedVerifCol) GetColAssignment

func (ex ExpandedVerifCol) GetColAssignment(run ifaces.Runtime) ifaces.ColAssignment

GetColAssignment returns the assignment of the current column

func (ExpandedVerifCol) GetColAssignmentAt

func (ex ExpandedVerifCol) GetColAssignmentAt(run ifaces.Runtime, pos int) field.Element

GetColAssignmentAt returns a particular position of the column

func (ExpandedVerifCol) GetColAssignmentGnark

func (ex ExpandedVerifCol) GetColAssignmentGnark(run ifaces.GnarkRuntime) []frontend.Variable

GetColAssignment returns a gnark assignment of the current column

func (ExpandedVerifCol) GetColAssignmentGnarkAt

func (ex ExpandedVerifCol) GetColAssignmentGnarkAt(run ifaces.GnarkRuntime, pos int) frontend.Variable

GetColAssignmentGnarkAt returns a particular position of the column in a gnark circuit

func (ExpandedVerifCol) GetColID

func (ex ExpandedVerifCol) GetColID() ifaces.ColID

GetColID returns the column ID

func (ExpandedVerifCol) IsComposite

func (ex ExpandedVerifCol) IsComposite() bool

IsComposite implements the ifaces.Column interface

func (ExpandedVerifCol) MustExists

func (ex ExpandedVerifCol) MustExists()

MustExists implements the ifaces.Column interface and always returns true.

func (ExpandedVerifCol) Round

func (ex ExpandedVerifCol) Round() int

Round returns the round ID of the column and implements the ifaces.Column interface.

func (ExpandedVerifCol) Size

func (ex ExpandedVerifCol) Size() int

Size returns the size of the colum and implements the ifaces.Column interface.

func (ExpandedVerifCol) Split

func (ex ExpandedVerifCol) Split(_ *wizard.CompiledIOP, from, to int) ifaces.Column

Split implements the VerifierCol interface

func (ExpandedVerifCol) String

func (ex ExpandedVerifCol) String() string

String implements the [symbolic.Metadata] interface

type FivcOp

type FivcOp func(*fromIntVecCoinSettings)

Options to pass to FIVC

type FromAccessors

type FromAccessors struct {
	// Accessors stores the list of accessors building the column.
	Accessors []ifaces.Accessor
	Padding   field.Element
	Size_     int
	// Round_ caches the round value of the column.
	Round_ int
}

FromAccessors is a VerifierCol implementation that is built by stacking the values of ifaces.Accessor on top of each others. It is the most type of column and subsumes almost all the other types.

func (FromAccessors) GetColAssignment

func (f FromAccessors) GetColAssignment(run ifaces.Runtime) ifaces.ColAssignment

GetColAssignment returns the assignment of the current column

func (FromAccessors) GetColAssignmentAt

func (f FromAccessors) GetColAssignmentAt(run ifaces.Runtime, pos int) field.Element

GetColAssignmentAt returns a particular position of the column

func (FromAccessors) GetColAssignmentGnark

func (f FromAccessors) GetColAssignmentGnark(run ifaces.GnarkRuntime) []frontend.Variable

GetColAssignment returns a gnark assignment of the current column

func (FromAccessors) GetColAssignmentGnarkAt

func (f FromAccessors) GetColAssignmentGnarkAt(run ifaces.GnarkRuntime, pos int) frontend.Variable

GetColAssignmentGnarkAt returns a particular position of the column in a gnark circuit

func (FromAccessors) GetColID

func (f FromAccessors) GetColID() ifaces.ColID

GetColID returns the column ID

func (FromAccessors) IsComposite

func (f FromAccessors) IsComposite() bool

IsComposite implements the ifaces.Column interface

func (FromAccessors) MustExists

func (f FromAccessors) MustExists()

MustExists implements the ifaces.Column interface and always returns true.

func (FromAccessors) Round

func (f FromAccessors) Round() int

Round returns the round ID of the column and implements the ifaces.Column interface.

func (FromAccessors) Size

func (f FromAccessors) Size() int

Size returns the size of the colum and implements the ifaces.Column interface.

func (FromAccessors) Split

func (f FromAccessors) Split(_ *wizard.CompiledIOP, from, to int) ifaces.Column

Split implements the VerifierCol interface

func (FromAccessors) String

func (f FromAccessors) String() string

String implements the [symbolic.Metadata] interface

type FromYs

type FromYs struct {
	// The list of the evaluated column in the same order
	// as we like to layout the currently-described column
	Ranges []ifaces.ColID
	// The Query from which we shall select the evaluations
	Query query.UnivariateEval
	// Remember the round in which the query was made
	Round_ int
}

Represents a column populated by alleged evaluations of arrange of columns

func (FromYs) GetColAssignment

func (fys FromYs) GetColAssignment(run ifaces.Runtime) ifaces.ColAssignment

Returns the coin's value as a column assignment

func (FromYs) GetColAssignmentAt

func (fys FromYs) GetColAssignmentAt(run ifaces.Runtime, pos int) field.Element

Returns a particular position of the coin value

func (FromYs) GetColAssignmentGnark

func (fys FromYs) GetColAssignmentGnark(run ifaces.GnarkRuntime) []frontend.Variable

Returns the coin's value as a column assignment

func (FromYs) GetColAssignmentGnarkAt

func (fys FromYs) GetColAssignmentGnarkAt(run ifaces.GnarkRuntime, pos int) frontend.Variable

Returns a particular position of the coin value

func (FromYs) GetColID

func (fys FromYs) GetColID() ifaces.ColID

Returns a generic name from the column. Defined from the coin's.

func (FromYs) IsComposite

func (fys FromYs) IsComposite() bool

func (FromYs) MustExists

func (fys FromYs) MustExists()

Always return true. We sanity-check the existence of the random coin prior to constructing the object.

func (FromYs) Round

func (fys FromYs) Round() int

Returns the round of definition of the column

func (FromYs) Size

func (fys FromYs) Size() int

Return the size of the fys

func (FromYs) Split

func (fys FromYs) Split(comp *wizard.CompiledIOP, from, to int) ifaces.Column

Split the FromYs by restricting to a range

func (FromYs) String

func (fys FromYs) String() string

Returns the name of the column.

type VerifierCol

type VerifierCol interface {
	ifaces.Column
	Split(comp *wizard.CompiledIOP, from, to int) ifaces.Column
}

Jump to

Keyboard shortcuts

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