Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b6a374a
chore: gnark dependency update
ivokub Sep 18, 2025
2d1d55e
chore: cherry pick gkr changes from smallfield
ivokub Aug 29, 2025
8bbd5ba
fix: gnark logderiv interface change
ivokub Aug 29, 2025
af228c7
fix: remove unused test engine option
ivokub Aug 29, 2025
896ba98
fix: typed builder
ivokub Aug 29, 2025
ae6bc69
fix: gnark schema walker field
ivokub Aug 29, 2025
6902d28
feat: csvtraces fill up to column size
ivokub Aug 29, 2025
81d4abf
feat: add BLS precompile glue
ivokub Aug 29, 2025
44d9251
test: include minimal number of test files
ivokub Sep 2, 2025
9b138df
test: add BLS testdata generator
ivokub Sep 5, 2025
c1bb5b6
chore: go mod tidy
ivokub Sep 18, 2025
3bf1ff6
fix: change ordering of serialized values
ivokub Sep 24, 2025
152d2a0
test: update included test files
ivokub Sep 24, 2025
e823165
feat: remove circuit number limits
ivokub Sep 26, 2025
b392c30
fix: align G2 tower order with gnark
ivokub Sep 29, 2025
d312c3d
test: regenerate testdata
ivokub Sep 29, 2025
a102526
feat: precise bls source getters
ivokub Sep 29, 2025
81a8876
docs: limits documentation
ivokub Sep 29, 2025
4d526ed
feat: integrate BLS precompile with zkevm
ivokub Sep 29, 2025
5fdb039
test: make source local
ivokub Sep 26, 2025
6f60e01
Merge branch 'main' into feat/bls-glue
ivokub Nov 16, 2025
b83d78c
fix: compilation errors
ivokub Nov 16, 2025
f76c7c4
chore: remove excessive logging
ivokub Nov 16, 2025
dd4e1eb
chore: clarify error message
ivokub Nov 16, 2025
afbfaee
fix: store new rangechecker
ivokub Nov 16, 2025
206ee01
fix: ensure unique constraints
ivokub Nov 16, 2025
be09cf7
fix: incorrect limb count for scalar
ivokub Nov 16, 2025
439b911
fix: more unique constraint names
ivokub Nov 16, 2025
c5117f9
feat: add default circuit sizes
ivokub Nov 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ __pycache__/
/jvm-libs/**/darwin-x86-64

/prover/**/*.csv
/prover/**/testdata/
# Exclude files in testdata directories, but not the directories themselves to allow
# add exceptions (gitignore doesn't permit exceptions when root dir is excluded)
/prover/**/testdata/*
# Testdata, otherwise that's 400MB of data downloaded
/prover/**/integration-testing/testdata/prover-requests/
/prover/**/vendor/
Expand Down Expand Up @@ -147,4 +149,6 @@ __pycache__/
!prover/**/testdata/**/*.csv
!prover/**/utils/profiling
!prover/**/verifying_key.bin
!/sdk/src/lib/compressor/bin
!/sdk/src/lib/compressor/bin
# Allow BLS glue testdata generators
!prover/zkevm/prover/bls/testdata/*.go
2 changes: 1 addition & 1 deletion prover/circuits/aggregation/circuit.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (c *Circuit) Define(api frontend.API) error {
}

// create a lookup table of actual public inputs
actualPI := make([]*logderivlookup.Table, (emFr{}).NbLimbs())
actualPI := make([]logderivlookup.Table, (emFr{}).NbLimbs())
for i := range actualPI {
actualPI[i] = logderivlookup.New(api)
}
Expand Down
5 changes: 3 additions & 2 deletions prover/circuits/blobdecompression/v0/compress/internal/io.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import (
// TODO Use std/rangecheck instead
type RangeChecker struct {
api frontend.API
tables map[uint]*logderivlookup.Table
tables map[uint]logderivlookup.Table
}

func NewRangeChecker(api frontend.API) *RangeChecker {
return &RangeChecker{api: api, tables: make(map[uint]*logderivlookup.Table)}
return &RangeChecker{api: api, tables: make(map[uint]logderivlookup.Table)}
}

func (r *RangeChecker) AssertLessThan(bound uint, c ...frontend.Variable) {
Expand All @@ -36,6 +36,7 @@ func (r *RangeChecker) AssertLessThan(bound uint, c ...frontend.Variable) {
cRangeTable, ok := r.tables[bound]
if !ok {
cRangeTable := logderivlookup.New(r.api)
r.tables[bound] = cRangeTable
for i := uint(0); i < bound; i++ {
cRangeTable.Insert(0)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func Decompress(api frontend.API, c []frontend.Variable, cLength frontend.Variab
return dLength, nil
}

func initAddrTable(api frontend.API, bytes, c []frontend.Variable, wordNbBits int, backrefs []lzss.BackrefType) *logderivlookup.Table {
func initAddrTable(api frontend.API, bytes, c []frontend.Variable, wordNbBits int, backrefs []lzss.BackrefType) logderivlookup.Table {
for i := range backrefs {
if backrefs[i].NbBitsLength != backrefs[0].NbBitsLength {
panic("all backref types must have the same length size")
Expand Down
2 changes: 1 addition & 1 deletion prover/circuits/blobdecompression/v1/snark.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func CheckBatchesSums(api frontend.API, hasher snarkHash.FieldHasher, nbBatches
}

var (
partialSumsT *logderivlookup.Table
partialSumsT logderivlookup.Table
partialSums []frontend.Variable
)
// create a table of claimed sums and prove their correctness as we go through the payload
Expand Down
8 changes: 4 additions & 4 deletions prover/circuits/internal/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func AssertIsLessIf(api frontend.API, cond, a, b frontend.Variable) {
api.AssertIsLessOrEqual(a_, b_)
}

func SliceToTable(api frontend.API, slice []frontend.Variable) *logderivlookup.Table {
func SliceToTable(api frontend.API, slice []frontend.Variable) logderivlookup.Table {
table := logderivlookup.New(api)
for i := range slice {
table.Insert(slice[i])
Expand Down Expand Up @@ -271,7 +271,7 @@ func (s VarSlice) Range(api frontend.API) *Range {
func Concat(api frontend.API, maxLinearizedLength int, slices ...VarSlice) Slice[frontend.Variable] {

res := Slice[frontend.Variable]{make([]frontend.Variable, maxLinearizedLength), 0}
var outT *logderivlookup.Table
var outT logderivlookup.Table
{ // hint
inLen := 2 * len(slices)
for i := range slices {
Expand Down Expand Up @@ -414,7 +414,7 @@ func ChecksumSubSlices(api frontend.API, hsh snarkHash.FieldHasher, slice []fron
lastElems[i] =
plonk.EvaluateExpression(api, e, endpointsR.InRange[i], 0, -1-len(slice), 1, len(slice))
}
var lastElemsT *logderivlookup.Table
var lastElemsT logderivlookup.Table
if len(slice) > 1 {
lastElemsT = SliceToTable(api, lastElems)
lastElemsT.Insert(len(slice)) // in case subEndPoints is tight
Expand Down Expand Up @@ -730,7 +730,7 @@ func PartitionSlice(api frontend.API, s []frontend.Variable, selectors []fronten
panic(err)
}

subsT := make([]*logderivlookup.Table, len(subs))
subsT := make([]logderivlookup.Table, len(subs))
for i := range subs {
copy(subs[i], subsGlued[:len(subs[i])])
subsGlued = subsGlued[len(subs[i]):]
Expand Down
3 changes: 2 additions & 1 deletion prover/circuits/prove.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ func ProveCheck(setup *Setup, assignment frontend.Circuit, opts ...any) (plonk.P
assignment,
assignment,
setup.Circuit.Field(),
test.WithBackendProverOptions(proverOpts...),
// this test engine prover option was no-op before and it was removed
// test.WithBackendProverOptions(proverOpts...),
)
return nil, fmt.Errorf("while running the plonk prover: %w", errDetail)
}
Expand Down
6 changes: 3 additions & 3 deletions prover/crypto/mimc/factories.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type externalHashBuilderIFace interface {
// storeCommitBuilder implements [frontend.Builder], [frontend.Committer] and
// other methods useful to define a custom external hasher.
type storeCommitBuilder interface {
frontend.Builder
frontend.Builder[constraint.U64]
frontend.Committer
SetKeyValue(key, value any)
GetKeyValue(key any) (value any)
Expand Down Expand Up @@ -168,8 +168,8 @@ func (h *ExternalHasher) compress(state, block frontend.Variable) frontend.Varia
// taking part in each claim.
func NewExternalHasherBuilder(addGateForHashCheck bool) (frontend.NewBuilder, func() [][3][2]int) {
rcCols := make(chan [][3][2]int)
return func(field *big.Int, config frontend.CompileConfig) (frontend.Builder, error) {
b, err := scs.NewBuilder(field, config)
return func(field *big.Int, config frontend.CompileConfig) (frontend.Builder[constraint.U64], error) {
b, err := scs.NewBuilder[constraint.U64](field, config)
if err != nil {
return nil, fmt.Errorf("could not create new native builder: %w", err)
}
Expand Down
104 changes: 0 additions & 104 deletions prover/crypto/mimc/gkrmimc/finalgates.go

This file was deleted.

Loading
Loading