Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
201 commits
Select commit Hold shift + click to select a range
609d47d
refactor: addInstance instead of series etc
Tabaie Jun 1, 2025
79d4cbf
feat: check for duplicate gates, allow limiting curves for gate
Tabaie Jun 1, 2025
82e33e5
refactor: gkr api tests
Tabaie Jun 1, 2025
ba06e5d
refactor gkr example
Tabaie Jun 1, 2025
700c152
refactor: solve hint called per instance
Tabaie Jun 2, 2025
30f5633
revert: newPrint back in std/gkr to avoid import cycle
Tabaie Jun 2, 2025
44d6b4c
refactor: remove circuit/instance rearranging
Tabaie Jun 2, 2025
f5f726c
chore: generify
Tabaie Jun 2, 2025
644fd6a
fix: registry duplicate detection
Tabaie Jun 2, 2025
2001e83
fix: solver hint id mismatch
Tabaie Jun 2, 2025
d3ca3c1
remove redundant make
Tabaie Jun 2, 2025
6474482
fix: works on plonk
Tabaie Jun 2, 2025
0c0b6b0
refactor: solve hint for test engine
Tabaie Jun 3, 2025
478d53d
fix prove hint
Tabaie Jun 3, 2025
6c83740
fix package tests
Tabaie Jun 3, 2025
d6e382f
refactor: remove println
Tabaie Jun 3, 2025
a8f30a4
chore: generify print removal
Tabaie Jun 3, 2025
8ac5f9f
feat: GetValue
Tabaie Jun 3, 2025
5bb879d
fix all gkrapi tests pass
Tabaie Jun 3, 2025
7f9a0f1
fix gkr-poseidon2
Tabaie Jun 3, 2025
355277c
Merge branch 'master' into feat/gkr/add-instance
Tabaie Jun 3, 2025
cfdb9d3
fix: reduce in test engine
Tabaie Jun 3, 2025
12788f3
fix: rename GkrCompressions -> GkrPermutations
Tabaie Jun 3, 2025
9a0bf0e
bench: gkrposeidon2
Tabaie Jun 3, 2025
618beff
fix pad for bls12377
Tabaie Jun 3, 2025
22b77f2
some more padding fixes
Tabaie Jun 3, 2025
250a35b
fix: padding issue in bn254
Tabaie Jun 4, 2025
1586760
chore generify fix
Tabaie Jun 4, 2025
e593d90
Let Uint64 panic
Tabaie Jun 4, 2025
9df619a
Update constraint/solver/gkrgates/registry.go
Tabaie Jun 4, 2025
8c88c52
refactor: use assert.EqualError
Tabaie Jun 4, 2025
f4d7aa8
Merge branch 'master' into feat/gkr/add-instance
Tabaie Jun 5, 2025
499ff52
refactor: import hash/all in test
Tabaie Jun 5, 2025
be747e0
refactor: shorten import name
Tabaie Jun 5, 2025
4ae9324
Merge branch 'master' into feat/gkr/add-instance
Tabaie Jun 6, 2025
4b43ce3
perf: addition rather than multiplication in gates
Tabaie Jun 8, 2025
6b86526
Revert "perf: addition rather than multiplication in gates"
Tabaie Jun 8, 2025
c4b01b5
feat: generify poseidon2-gkr (not all s-Boxes available yet)
Tabaie Jun 8, 2025
4765d61
revert incorrect renaming
Tabaie Jun 8, 2025
5342952
fix test
Tabaie Jun 8, 2025
9d9b13b
refactor generify tests
Tabaie Jun 8, 2025
430661a
feat: gkrposeidon2 compression for all curves
Tabaie Jun 8, 2025
b75843d
feat gkr-poseidon2 hasher
Tabaie Jun 8, 2025
ca85a41
Merge branch 'feat/gkr/add-instance' into feat/gkr/hashes
Tabaie Jun 8, 2025
be8a07e
fix more renaming
Tabaie Jun 8, 2025
1894cfa
feat: gkrmimc for sbox degree 5
Tabaie Jun 9, 2025
241d645
mimc length 1 works
Tabaie Jun 10, 2025
bb36459
fix final layer
Tabaie Jun 10, 2025
311d9d9
chore generify Println changes
Tabaie Jun 10, 2025
b3d1af8
fix: use multicommitter
Tabaie Jun 10, 2025
815adc7
feat: use kvstore for caching instances
Tabaie Jun 10, 2025
85d6aaa
Merge branch 'feat/gkr/add-instance' into feat/gkr/hashes
Tabaie Jun 10, 2025
7ab8702
feat: merkledamgard hasher as statestorer
Tabaie Jun 11, 2025
2fb7daa
test: SetState
Tabaie Jun 11, 2025
de55a27
feat: mimc.New to return StateStorer
Tabaie Jun 11, 2025
31a0a59
fix: single instance and no instance edge cases
Tabaie Jun 11, 2025
bb0eca0
Merge branch 'feat/gkr/add-instance' into feat/gkr/hashes
Tabaie Jun 11, 2025
db56157
fix: single-instance, circuit with depth
Tabaie Jun 11, 2025
7e4b954
Merge branch 'feat/gkr/add-instance' into feat/gkr/hashes
Tabaie Jun 11, 2025
b4544d6
Merge branch 'master' into feat/gkr/add-instance
Tabaie Jun 15, 2025
bdd01fd
Merge branch 'master' into feat/gkr/add-instance
Tabaie Jun 23, 2025
c170695
Merge branch 'master' into feat/gkr/add-instance
Tabaie Jul 2, 2025
70802ea
Merge branch 'master' into feat/gkr/add-instance
Tabaie Jul 7, 2025
4ca453c
docs: address cursor comments
Tabaie Jul 8, 2025
f2b1122
Merge branch 'master' into feat/gkr/add-instance
Tabaie Jul 9, 2025
b9c01be
Merge branch 'master' into feat/gkr/add-instance
Tabaie Jul 28, 2025
8e92d99
Merge branch 'feat/gkr/add-instance' into feat/gkr/hashes
Tabaie Jul 28, 2025
893ba91
Merge branch 'master' into feat/gkr/add-instance
Tabaie Aug 6, 2025
a13ac27
Merge branch 'master' into feat/gkr/add-instance
Tabaie Aug 19, 2025
8947d9f
refactor: remove MapRange
Tabaie Aug 19, 2025
4a09fd1
Merge branch 'master' into feat/gkr/add-instance
Tabaie Aug 28, 2025
929d732
Merge branch 'master' into feat/gkr/add-instance
Tabaie Sep 17, 2025
3ec0778
Merge branch 'feat/gkr/add-instance' into feat/gkr/hashes
Tabaie Sep 17, 2025
8c37435
fix: bad merge
Tabaie Sep 17, 2025
1e20850
perf: single-elem pool for bls12-377
Tabaie Sep 17, 2025
4c69b65
build: generify changes
Tabaie Sep 17, 2025
b12c0ee
fix: api pointer receiver
Tabaie Sep 17, 2025
e6a64bc
bench: gkr mimc permutations
Tabaie Sep 17, 2025
d55dbf4
bench: gkr-mimc permutations
Tabaie Sep 17, 2025
b26f33c
Merge branch 'feat/gkr/hashes' into perf/mem/gkr
Tabaie Sep 17, 2025
466f16b
refactor: remove loadCs
Tabaie Sep 17, 2025
57e95bc
perf: reset api in gkr solver
Tabaie Sep 17, 2025
6755e03
build: generify api reset
Tabaie Sep 17, 2025
b1de735
`hashTree` -> `merkleTree`
Tabaie Sep 17, 2025
6c4c5c6
docs: copilot-inspired explanation for `freeElements`
Tabaie Sep 17, 2025
8d0b353
perf: more pool freeing
Tabaie Sep 17, 2025
5a048b6
perf: dedicated exp function
Tabaie Sep 22, 2025
c6b830c
build: generify exp changes
Tabaie Sep 22, 2025
7bb78e7
fix: test for all curves
Tabaie Sep 22, 2025
58a0fdb
perf: fastpath for ^17
Tabaie Sep 22, 2025
4b2c102
fix: exp
Tabaie Sep 22, 2025
30c39b4
fix: exp. really
Tabaie Sep 22, 2025
6c7a7fc
test: modernize benchmark
Tabaie Sep 22, 2025
266c5f6
Revert "build: generify exp changes"
Tabaie Sep 22, 2025
5dd1d61
revert: exp func
Tabaie Sep 22, 2025
1374bab
refactor: modulus name
Tabaie Sep 22, 2025
9959f8a
revert: remove FrontendApiWrapper
Tabaie Sep 22, 2025
271cff9
perf: dedicated exp17 func
Tabaie Sep 23, 2025
1519d52
perf: SumExp17
Tabaie Sep 24, 2025
2e3be9f
perf: cache key as fr.Element
Tabaie Sep 24, 2025
a05f8d6
build: generify
Tabaie Sep 24, 2025
f6613ce
perf: store keys as fr.Elements instead of big.Int
Tabaie Sep 30, 2025
d7eec96
Merge branch 'master' into feat/gkr/hashes
Tabaie Jan 7, 2026
610d49c
fix: match api changes
Tabaie Jan 7, 2026
8549a0b
fix: api use
Tabaie Jan 7, 2026
8bcce8f
remove engine_hints
Tabaie Jan 7, 2026
a045f11
revert change to engine.go
Tabaie Jan 7, 2026
9c35fd7
fix: mimc tests
Tabaie Jan 7, 2026
dd4e36a
fix: error message
Tabaie Jan 7, 2026
f2d2c2f
Merge branch 'master' into feat/gkr/hashes
Tabaie Jan 8, 2026
560e80e
fix: error on empty list
Tabaie Jan 8, 2026
bc1750c
Merge branch 'master' into feat/gkr/hashes
Tabaie Jan 9, 2026
543905e
Merge branch 'feat/gkr/hashes' into perf/mem/gkr-exp17
Tabaie Jan 9, 2026
c80eff5
revert: api in the solve hint
Tabaie Jan 11, 2026
17f7285
feat: first pass at compiled gates
Tabaie Jan 12, 2026
c4b73d0
refactor: clean up gate compilation
Tabaie Jan 12, 2026
5e9239e
fix: gkr.go and gkr_testing.go for bn254
Tabaie Jan 12, 2026
82aad28
build: generify gate_testing
Tabaie Jan 12, 2026
2a854dc
build: generify changes to gkr.go
Tabaie Jan 12, 2026
c11be57
Merge branch 'master' into feat/gkr/compiled-gates
Tabaie Jan 12, 2026
9830c6b
fix: gate registry
Tabaie Jan 13, 2026
c1b4062
revert: bring back Evaluate
Tabaie Jan 13, 2026
c70ae4d
fix: gkr_test
Tabaie Jan 13, 2026
d7f365c
feat: circuit evaluator pool in Solve Hint
Tabaie Jan 13, 2026
f0668e5
fix: not reading variables bug
Tabaie Jan 13, 2026
fd88aed
fix: Complete() bug
Tabaie Jan 13, 2026
8548102
fix: startup frame size
Tabaie Jan 13, 2026
53e6e8e
fix: error on empty gates
Tabaie Jan 13, 2026
1b961f5
perf: take executors outside
Tabaie Jan 13, 2026
a38d67b
fix: don't copy async things
Tabaie Jan 13, 2026
2aa3720
perf: gate evaluator pools
Tabaie Jan 14, 2026
3801200
build: generify
Tabaie Jan 14, 2026
40d43c5
perf: use switch instead of func ptr
Tabaie Jan 14, 2026
bbc0b59
build: generify and get rid of Println
Tabaie Jan 14, 2026
c8b3da3
fix: AI feedback
Tabaie Jan 14, 2026
1651b4f
minor cleanups
Tabaie Jan 14, 2026
a2fa8b3
fix: AI suggestions
Tabaie Jan 14, 2026
0fadf54
Merge branch 'master' into feat/gkr/compiled-gates
Tabaie Jan 16, 2026
6857066
bench: merkle tree
Tabaie Jan 16, 2026
c6de241
perf: universal gate evaluators
Tabaie Jan 21, 2026
b2e17d0
bench: modernize the gkr mimc benchmark
Tabaie Jan 21, 2026
7bd8382
revert: universal gates
Tabaie Jan 21, 2026
4f28b07
Merge branch 'master' into feat/gkr/compiled-gates
Tabaie Jan 21, 2026
d31afd6
Merge branch 'master' into feat/gkr/compiled-gates
Tabaie Jan 21, 2026
e3ea981
Merge branch 'master' into feat/gkr/compiled-gates
Tabaie Jan 21, 2026
ae8f5e1
feat: blueprint for bn254
Tabaie Jan 22, 2026
7d86c47
build: generify
Tabaie Jan 23, 2026
f74a6cb
refactor: remove unnecessary size parameters from instruction input
Tabaie Jan 23, 2026
0bc2b79
fix: runtime pool initialization
Tabaie Jan 23, 2026
487cf7d
fix: montgomery conversion
Tabaie Jan 23, 2026
66e3d1f
fix: make metadata private
Tabaie Jan 23, 2026
a2dae18
fix: solve blueprint
Tabaie Jan 23, 2026
b449e1c
feat: get value blueprint
Tabaie Jan 23, 2026
9aaa533
fix: interface issues
Tabaie Jan 23, 2026
52007aa
feat: blueprints for all curves
Tabaie Jan 23, 2026
04e502b
refactor: generify circuit types
Tabaie Jan 23, 2026
60a167b
chore: some cleanup
Tabaie Jan 23, 2026
73d6d92
fix: json friendly circuit type
Tabaie Jan 23, 2026
e075fcc
fix: small things
Tabaie Jan 23, 2026
bdb7b7d
fix: test compile
Tabaie Jan 23, 2026
d621873
fix: add identity gates to test inputs
Tabaie Jan 23, 2026
9593052
fix: initialize blueprint
Tabaie Jan 23, 2026
33d6692
fix: panic with test engine
Tabaie Jan 23, 2026
5c33812
fix: circuit outs
Tabaie Jan 23, 2026
3ec214e
Merge branch 'master' into refactor/gkr/blueprints
Tabaie Jan 30, 2026
f68fae7
style: formatting
Tabaie Jan 30, 2026
c85d576
fix: remove re-added test engine funcs
Tabaie Jan 30, 2026
0c6dd9c
Revert "fix: remove re-added test engine funcs"
Tabaie Jan 30, 2026
ae408dc
revert: reinstate GetBlueprint mechanism
Tabaie Jan 30, 2026
837ca48
Merge branch 'master' into refactor/gkr/blueprints
Tabaie Feb 6, 2026
67edcf6
fix: calldata prepended by its own size
Tabaie Feb 6, 2026
65539ce
feat: first attempt at mismatch function
Tabaie Feb 8, 2026
2dd4d25
fix: Solve blueprint nondeterminism for bn254
Tabaie Feb 8, 2026
96edfaf
build: generify
Tabaie Feb 8, 2026
fa8c6c6
fix: codegen
Tabaie Feb 8, 2026
1945d67
fix: Prove dependence on Solve
Tabaie Feb 8, 2026
59ea748
remove unused field
Tabaie Feb 8, 2026
5aa15d5
fix: padding issues
Tabaie Feb 8, 2026
3fdb62a
fix: solving race condition
Tabaie Feb 8, 2026
efae0d7
refactor: proof.Flatten
Tabaie Feb 9, 2026
3f3dcf0
refactor: proof iterator
Tabaie Feb 9, 2026
761a6ee
fix: early termination bug
Tabaie Feb 9, 2026
4375623
refactor: use Reset to initialize
Tabaie Feb 9, 2026
5fc5a48
build: generify
Tabaie Feb 9, 2026
db9b2da
fix: Test engine to run reset
Tabaie Feb 10, 2026
d235209
Merge branch 'master' into refactor/gkr/blueprints
Tabaie Feb 11, 2026
14b592b
fix: remove decommissioned curves
Tabaie Feb 11, 2026
339668e
fix: remove newWitness out of bench loop
Tabaie Feb 11, 2026
d892646
remove unused field
Tabaie Feb 11, 2026
a9dcec1
fix: CBOR registration and outputWires setting
Tabaie Feb 11, 2026
5c72944
Merge branch 'master' into refactor/gkr/blueprints
Tabaie Feb 11, 2026
2a0000a
fix: CBOR serialization
Tabaie Feb 12, 2026
b2452ff
fix: remove binary
Tabaie Feb 12, 2026
51d6f10
fix: import cycle
Tabaie Feb 12, 2026
b28b092
remove unused assignments
Tabaie Feb 12, 2026
ff8f022
gofmt
Tabaie Feb 12, 2026
0a35875
fix: staticcheck
Tabaie Feb 12, 2026
eaf5178
refactor: centralize cbor magic number
Tabaie Feb 12, 2026
f1c8596
fix: unify testdata
Tabaie Feb 13, 2026
9f47c90
fix: testdata path
Tabaie Feb 13, 2026
0dc1d7b
remove unused constant
Tabaie Feb 13, 2026
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
5 changes: 5 additions & 0 deletions constraint/babybear/solver.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions constraint/babybear/system.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 5 additions & 25 deletions constraint/bls12-377/solver.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions constraint/bls12-377/system.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 5 additions & 25 deletions constraint/bls12-381/solver.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions constraint/bls12-381/system.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions constraint/blueprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ type Solver[E Element] interface {
// Read interprets input calldata as a LinearExpression,
// evaluates it and return the result and the number of uint32 word read.
Read(calldata []uint32) (E, int)

// GetBlueprint returns the blueprint with the given ID.
// This allows blueprints to query other blueprints by ID.
GetBlueprint(id BlueprintID) Blueprint
}

// BlueprintSolvable represents a blueprint that knows how to solve itself.
Expand Down
30 changes: 5 additions & 25 deletions constraint/bn254/solver.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions constraint/bn254/system.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 5 additions & 25 deletions constraint/bw6-761/solver.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions constraint/bw6-761/system.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions constraint/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/consensys/gnark-crypto/ecc"
"github.com/consensys/gnark/constraint/solver"
"github.com/consensys/gnark/debug"
"github.com/consensys/gnark/internal/gkr/gkrinfo"
"github.com/consensys/gnark/internal/smallfields"
"github.com/consensys/gnark/internal/utils"
"github.com/consensys/gnark/logger"
Expand Down Expand Up @@ -125,7 +124,6 @@ type System struct {
lbWireLevel []Level `cbor:"-"` // at which level we solve a wire. init at -1.

CommitmentInfo Commitments
GkrInfo []*gkrinfo.StoringInfo

genericHint BlueprintID
}
Expand Down Expand Up @@ -470,13 +468,3 @@ func putBuffer(buf *[]uint32) {
}
bufPool.Put(buf)
}

// NewGkr registers a GKR sub-circuit, returning a reference to an object where
// serializable data about the sub-circuit is to be stored, and an index as a
// reference to the GKR sub-circuit. The index is the first argument to all
// GKR-related hints.
func (system *System) NewGkr() (*gkrinfo.StoringInfo, int) {
i := len(system.GkrInfo)
system.GkrInfo = append(system.GkrInfo, new(gkrinfo.StoringInfo))
return system.GkrInfo[i], i
}
5 changes: 5 additions & 0 deletions constraint/koalabear/solver.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions constraint/koalabear/system.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading