core

package
v0.0.0-...-a36dab5 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnitAssert

func UnitAssert[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT, GtEl algebra.GtElementT](
	api frontend.API,
	verifyingKey plonk.VerifyingKey[FR, G1El, G2El],
	knownFpBytes chainark.FingerPrintBytes,
	currentSCProof plonk.Proof[FR, G1El, G2El],
	currentSCWitness plonk.Witness[FR],
	currentSCRoot sync_committee.SyncCommitteeRoot[FR],
	nextSCRoot sync_committee.SyncCommitteeRoot[FR],
	nextSCBranches [common.NextSyncCommitteeDepth][common.LenOfHash]uints.U8,
	stateRootBranches [common.StateRootDepth][common.LenOfHash]uints.U8,
	domain [common.LenOfHash]uints.U8,
	signature sw_bls12381.G2Affine,
	aggregationBits [common.LenOfValidators]frontend.Variable,
	pubKeys [common.LenOfValidators]sw_bls12381.G1Affine,
	threshold frontend.Variable,
) error

Types

type UnitCircuit

type UnitCircuit[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT, GtEl algebra.GtElementT] struct {
	// Current sync committee
	VerifyingKey                plonk.VerifyingKey[FR, G1El, G2El] `gnark:"-"`
	VKeyFpBytes                 chainark.FingerPrintBytes          // constant, to constraint vkey
	CurrentSyncCommitteeProof   plonk.Proof[FR, G1El, G2El]
	CurrentSyncCommitteeWitness plonk.Witness[FR]
	CurrentSyncCommitteeRoot    sync_committee.SyncCommitteeRoot[FR] `gnark:",public"`

	// Data to rebuild block root
	NextSyncCommitteeRoot     sync_committee.SyncCommitteeRoot[FR] `gnark:",public"`
	NextSyncCommitteeBranches [common.NextSyncCommitteeDepth][common.LenOfHash]uints.U8
	StateRootBranches         [common.StateRootDepth][common.LenOfHash]uints.U8

	// Signature
	Domain          [common.LenOfHash]uints.U8
	Signature       sw_bls12381.G2Affine
	AggregationBits [common.LenOfValidators]frontend.Variable
	PubKeys         [common.LenOfValidators]sw_bls12381.G1Affine
	Threshold       uint // must be constant
}

func (*UnitCircuit[FR, G1El, G2El, GtEl]) Define

func (uc *UnitCircuit[FR, G1El, G2El, GtEl]) Define(api frontend.API) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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