Documentation ¶
Index ¶
- func AssertFpWitness[FR emulated.FieldParams](api frontend.API, fp FingerPrint, witnessValues []emulated.Element[FR], ...)
- func AssertIDWitness[FR emulated.FieldParams](api frontend.API, id LinkageID, witnessValues []emulated.Element[FR], ...)
- func AssertValsVSWtnsElements[FR emulated.FieldParams](api frontend.API, vars []frontend.Variable, ...)
- func IsIDEqualToWitness[FR emulated.FieldParams](api frontend.API, id LinkageID, witnessValues []emulated.Element[FR], ...) frontend.Variable
- func NewGenesisAssignment[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT, ...](unitVkey plonk.VerifyingKey[FR, G1El, G2El], ...) frontend.Circuit
- func NewGenesisCircuit[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT, ...](nbIdVals, bitsPerIdVal, nbFpVals, bitsPerFpVal int, ...) frontend.Circuit
- func NewRecursiveAssignment[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT, ...](firstVkey, unitVkey plonk.VerifyingKey[FR, G1El, G2El], ...) frontend.Circuit
- func NewRecursiveCircuit[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT, ...](idLength, bitsPerIdVal, fpLength, bitsPerFpVal int, ...) frontend.Circuit
- func TestValsVSWtnsElements[FR emulated.FieldParams](api frontend.API, vars []frontend.Variable, ...) frontend.Variable
- func TestVkeyFp[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT, ...](api frontend.API, vkey plonk.VerifyingKey[FR, G1El, G2El], otherFp FingerPrint) (frontend.Variable, error)
- func ValsFromBytes(data []byte, bitsPerVar int) []frontend.Variable
- func ValsToU8s(api frontend.API, vals []frontend.Variable, bitsPerVar int) ([]uints.U8, error)
- type FingerPrint
- type FingerPrintBytes
- type FpExtractor
- type GenesisCircuit
- type GenesisOrRecursiveProof
- type LinkageID
- type LinkageIDBytes
- type RecursiveCircuit
- type UnitProof
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertFpWitness ¶
func AssertFpWitness[FR emulated.FieldParams]( api frontend.API, fp FingerPrint, witnessValues []emulated.Element[FR], nbMaxBitsPerVar ...uint, )
func AssertIDWitness ¶
func AssertValsVSWtnsElements ¶ added in v0.2.0
func IsIDEqualToWitness ¶ added in v0.2.0
func NewGenesisAssignment ¶ added in v0.2.0
func NewGenesisAssignment[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT, GtEl algebra.GtElementT]( unitVkey plonk.VerifyingKey[FR, G1El, G2El], firstProof, secondProof plonk.Proof[FR, G1El, G2El], firstWitness, secondWitness plonk.Witness[FR], recursiveFp FingerPrint, genesisId, firstId, secondId LinkageID, ) frontend.Circuit
func NewGenesisCircuit ¶ added in v0.2.0
func NewGenesisCircuit[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT, GtEl algebra.GtElementT]( nbIdVals, bitsPerIdVal, nbFpVals, bitsPerFpVal int, ccsUnit constraint.ConstraintSystem, unitFpBytes FingerPrintBytes) frontend.Circuit
func NewRecursiveAssignment ¶ added in v0.2.0
func NewRecursiveAssignment[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT, GtEl algebra.GtElementT]( firstVkey, unitVkey plonk.VerifyingKey[FR, G1El, G2El], firstProof, secondProof plonk.Proof[FR, G1El, G2El], firstWitness, secondWitness plonk.Witness[FR], recursiveFp FingerPrint, genesisId, firstId, secondId LinkageID, ) frontend.Circuit
func NewRecursiveCircuit ¶ added in v0.2.0
func NewRecursiveCircuit[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT, GtEl algebra.GtElementT]( idLength, bitsPerIdVal, fpLength, bitsPerFpVal int, ccsUnit, ccsGenesis constraint.ConstraintSystem, unitFpBytes, genesisFpBytes FingerPrintBytes) frontend.Circuit
func TestValsVSWtnsElements ¶ added in v0.2.0
func TestVkeyFp ¶
func TestVkeyFp[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT, GtEl algebra.GtElementT]( api frontend.API, vkey plonk.VerifyingKey[FR, G1El, G2El], otherFp FingerPrint) (frontend.Variable, error)
func ValsFromBytes ¶ added in v0.2.0
Types ¶
type FingerPrint ¶
func FingerPrintFromBytes ¶
func FingerPrintFromBytes(data FingerPrintBytes, bitsPerVar int) FingerPrint
func NewFingerPrint ¶
func NewFingerPrint(v []frontend.Variable, b int) FingerPrint
func PlaceholderFingerPrint ¶
func PlaceholderFingerPrint(nbVars, bitsPerVar int) FingerPrint
func (FingerPrint) AssertIsEqual ¶
func (fp FingerPrint) AssertIsEqual(api frontend.API, other FingerPrint)
func (FingerPrint) IsEqual ¶
func (fp FingerPrint) IsEqual(api frontend.API, other FingerPrint) frontend.Variable
type FingerPrintBytes ¶
type FingerPrintBytes []byte
type FpExtractor ¶
type FpExtractor[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT] struct { Vkey recursive_plonk.VerifyingKey[FR, G1El, G2El] }
type GenesisCircuit ¶
type GenesisCircuit[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT, GtEl algebra.GtElementT] struct { UnitVKey plonk.VerifyingKey[FR, G1El, G2El] FirstProof plonk.Proof[FR, G1El, G2El] SecondProof plonk.Proof[FR, G1El, G2El] AcceptableFirstFp FingerPrint `gnark:",public"` // only there to keep the shape of genesis public witness in alignment with that of recursive GenesisID LinkageID `gnark:",public"` FirstID LinkageID SecondID LinkageID `gnark:",public"` FirstWitness plonk.Witness[FR] // GenesisID -> FirstID SecondWitness plonk.Witness[FR] // FirstID -> SecondID // some constant values passed from outside UnitVkeyFpBytes FingerPrintBytes }
type GenesisOrRecursiveProof ¶
type GenesisOrRecursiveProof[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT, GtEl algebra.GtElementT] struct { BeginID LinkageID EndID LinkageID }
func (*GenesisOrRecursiveProof[FR, G1El, G2El, GtEl]) Assert ¶
func (rp *GenesisOrRecursiveProof[FR, G1El, G2El, GtEl]) Assert( api frontend.API, verifier *plonk.Verifier[FR, G1El, G2El, GtEl], vkey plonk.VerifyingKey[FR, G1El, G2El], witness plonk.Witness[FR], acceptableFp FingerPrint, genesisFpBytes FingerPrintBytes, proof plonk.Proof[FR, G1El, G2El]) error
type LinkageID ¶
func LinkageIDFromBytes ¶
func LinkageIDFromBytes(data LinkageIDBytes, bitsPerVar int) LinkageID
func LinkageIDFromU8s ¶
little-endian here
func PlaceholderLinkageID ¶
func (LinkageID) AssertIsEqual ¶
type LinkageIDBytes ¶
type LinkageIDBytes []byte
type RecursiveCircuit ¶
type RecursiveCircuit[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT, GtEl algebra.GtElementT] struct { FirstVKey plonk.VerifyingKey[FR, G1El, G2El] FirstProof plonk.Proof[FR, G1El, G2El] AcceptableFirstFp FingerPrint `gnark:",public"` SecondVKey plonk.VerifyingKey[FR, G1El, G2El] SecondProof plonk.Proof[FR, G1El, G2El] BeginID LinkageID `gnark:",public"` RelayID LinkageID EndID LinkageID `gnark:",public"` FirstWitness plonk.Witness[FR] SecondWitness plonk.Witness[FR] // some constant values passed from outside GenesisFpBytes FingerPrintBytes UnitVKeyFpBytes FingerPrintBytes }
type UnitProof ¶
type UnitProof[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT, GtEl algebra.GtElementT] struct { BeginID LinkageID EndID LinkageID }
func (*UnitProof[FR, G1El, G2El, GtEl]) AssertRelations ¶ added in v0.2.0
func (up *UnitProof[FR, G1El, G2El, GtEl]) AssertRelations( api frontend.API, vkey plonk.VerifyingKey[FR, G1El, G2El], witness plonk.Witness[FR], fpFixed FingerPrint) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.