common

package
v0.0.0-...-35a8ded Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateColFn

func CreateColFn(comp *wizard.CompiledIOP, rootName string, size int) func(name string, args ...interface{}) ifaces.Column

It commits to the columns of round zero, from the same module.

func HashOf

func HashOf(comp *wizard.CompiledIOP, inputCols []ifaces.Column) (ifaces.Column, wizard.ProverAction)

HashOf returns an ifaces.Column object containing the hash of the inputs columns and a wizard.ProverAction object responsible for assigning all the column taking part in justifying the returned column as well as the returned column itself.

Types

type VectorBuilder

type VectorBuilder struct {
	// contains filtered or unexported fields
}

VectorBuilder is a convenience structure to assign columns by appending field elements on top of field elements.

func NewVectorBuilder

func NewVectorBuilder(col ifaces.Column) *VectorBuilder

NewVectorBuilder initializes a new VectorBuilder with a new column.

func (*VectorBuilder) Height

func (vb *VectorBuilder) Height() int

Height returns the total number of elements that have been pushed on this builder.

func (*VectorBuilder) OverWriteInt

func (vb *VectorBuilder) OverWriteInt(n int)

it overwrites the last push

func (*VectorBuilder) PadAndAssign

func (vb *VectorBuilder) PadAndAssign(run *wizard.ProverRuntime, v ...field.Element)

PadAndAssign pads and assign the column built by `vb` using `v` as padding value and assigning into `run`.

func (*VectorBuilder) Pop

func (vb *VectorBuilder) Pop()

Pop removes the last pushed value of the column.

func (*VectorBuilder) PushAddr

func (vb *VectorBuilder) PushAddr(addr types.EthAddress)

PushAddr pushes an ethereum address onto `vb`

func (*VectorBuilder) PushBoolean

func (vb *VectorBuilder) PushBoolean(bo bool)

PushBoolean pushes one for bo=true and zero for bo=false.

func (*VectorBuilder) PushBytes

func (vb *VectorBuilder) PushBytes(b32 []byte)

PushBytes32 pushes a types.Bytes32 as a single value onto `vb`. It panics if the value overflows a field element.

func (*VectorBuilder) PushBytes32

func (vb *VectorBuilder) PushBytes32(b32 types.Bytes32)

PushBytes32 pushes a types.Bytes32 as a single value onto `vb`. It panics if the value overflows a field element.

func (*VectorBuilder) PushField

func (vb *VectorBuilder) PushField(f field.Element)

PushField pushes `f` onto `vb`

func (*VectorBuilder) PushHi

func (vb *VectorBuilder) PushHi(fb types.FullBytes32)

PushHi pushes the 16 first bytes of `fb` onto `vb`.

func (*VectorBuilder) PushInc

func (vb *VectorBuilder) PushInc()

PushInc repushes that last element incremented by 1

func (*VectorBuilder) PushIncBy

func (vb *VectorBuilder) PushIncBy(by int)

PushInc repushes that last element incremented by 1

func (*VectorBuilder) PushInt

func (vb *VectorBuilder) PushInt(x int)

PushInt pushes `x` onto `vb`.

func (*VectorBuilder) PushLo

func (vb *VectorBuilder) PushLo(fb types.FullBytes32)

PushLo pushes the 16 last bytes of `fb` onto `vb“.

func (*VectorBuilder) PushOne

func (vb *VectorBuilder) PushOne()

PushOne pushes 1 onto `vb`

func (*VectorBuilder) PushSliceF

func (vb *VectorBuilder) PushSliceF(s []field.Element)

it pushes a slice of field Element

func (*VectorBuilder) PushZero

func (vb *VectorBuilder) PushZero()

PushZero pushes 0 onto `vb`

func (*VectorBuilder) RepushLast

func (vb *VectorBuilder) RepushLast()

RepushLast pushes a value equal to the last pushed value of `vb`

func (*VectorBuilder) Resize

func (vb *VectorBuilder) Resize(newLen int)

Resize resizes the slice up to `newLen`. Panics if the newLen is smaller than the current length.

func (*VectorBuilder) Slice

func (vb *VectorBuilder) Slice() []field.Element

Slice return the slice field of the VectorBuilder

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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