checkpoint

This commit is contained in:
Uma Roy
2023-10-11 12:20:48 -07:00
parent 5d53737841
commit b173b28649
8 changed files with 53 additions and 115 deletions

View File

@@ -10,6 +10,7 @@ import (
"github.com/consensys/gnark/frontend"
gl "github.com/succinctlabs/gnark-plonky2-verifier/goldilocks"
"github.com/succinctlabs/gnark-plonky2-verifier/poseidon"
"github.com/succinctlabs/gnark-plonky2-verifier/types"
"github.com/succinctlabs/gnark-plonky2-verifier/variables"
)
@@ -17,12 +18,12 @@ type Chip struct {
api frontend.API `gnark:"-"`
gl gl.Chip `gnark:"-"`
poseidonBN254Chip *poseidon.BN254Chip
friParams *variables.FriParams `gnark:"-"`
friParams *types.FriParams `gnark:"-"`
}
func NewChip(
api frontend.API,
friParams *variables.FriParams,
friParams *types.FriParams,
) *Chip {
poseidonBN254Chip := poseidon.NewBN254Chip(api)
return &Chip{
@@ -33,7 +34,7 @@ func NewChip(
}
}
func (f *Chip) assertLeadingZeros(powWitness gl.Variable, friConfig variables.FriConfig) {
func (f *Chip) assertLeadingZeros(powWitness gl.Variable, friConfig types.FriConfig) {
// Asserts that powWitness'es big-endian bit representation has at least `leading_zeros` leading zeros.
// Note that this is assuming that the Goldilocks field is being used. Specfically that the
// field is 64 bits long