Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
338 commits
Select commit Hold shift + click to select a range
92de6f6
refactor: delete fft
Jun 11, 2025
96c5eaf
feat: gnarkfext.Variable -> gnarkfext.Element
ThomasPiellard Jun 11, 2025
3cdc18a
feat: restord types + vortex
ThomasPiellard Jun 11, 2025
5849241
refactor: smartvectors + vector + vectorext
Jun 11, 2025
cd648cc
add renamed vector files
Jun 11, 2025
717c859
feat: merge
ThomasPiellard Jun 11, 2025
9472acf
feat: PolyEvalExt -> LinearCombinationExt
ThomasPiellard Jun 11, 2025
2827735
feat: fixed some poly functions
ThomasPiellard Jun 11, 2025
ac3dbbc
fix: fixed vortex
ThomasPiellard Jun 11, 2025
d484167
fix: state-management ok
ThomasPiellard Jun 11, 2025
d15cb19
refactor: minor changes
Jun 11, 2025
8b6b8f1
refactor fftext in rs ext
Jun 11, 2025
11241d5
refactor: delete ringsis
Jun 11, 2025
2361285
refactor: fiatshamir, mimc
Jun 11, 2025
63c1689
rename
Jun 11, 2025
c4e0ffc
refactor: accessors and column
Jun 11, 2025
6eb39cb
refactor: crypto and math packages work
Jun 11, 2025
a91fb23
renaming
Jun 11, 2025
8aa5d82
refactor: fft.GetOmega -> fft.Generator
Jun 11, 2025
5ea4967
refactor: data type cleaning and renaming
Jun 11, 2025
421ea45
fix: periodicsample ok
ThomasPiellard Jun 12, 2025
51d14dc
fix: product.go ok
ThomasPiellard Jun 12, 2025
bc2a6a0
refactor: protocol
Jun 12, 2025
454b529
feat: fixed lincomb
ThomasPiellard Jun 12, 2025
965f899
feat: add missing functiton
ThomasPiellard Jun 12, 2025
6422e58
fix: fixed polyeval.go
ThomasPiellard Jun 12, 2025
310e2ee
fix: added missing function
ThomasPiellard Jun 12, 2025
ede128c
refactor: remove repeating computeLeaf
Jun 12, 2025
b0af20d
refactor: protocol: data types
Jun 12, 2025
a6187e9
fix: use Mixed function evalLagrange
ThomasPiellard Jun 12, 2025
b257673
fix: fixed periodicsample_test.go
ThomasPiellard Jun 12, 2025
0ae279c
refactor: data types extension, add some new funcs in math and crypto
Jun 13, 2025
c56c0e9
refactor: complier, mpts
Jun 16, 2025
d9732d0
refactor: add BatchEvaluateLagrangeGnark and BatchEvaluateLagrangeGna…
Jun 16, 2025
846a96b
refactor: fastpoly.BatchEvaluateLagrangeGnark
Jun 16, 2025
5bd451a
feat: migrate plonkinternal from U64 to U32 wip
ThomasPiellard Jun 17, 2025
ccf575c
refactor: assign leaf to [8]field.Element in column
Jun 17, 2025
b73b6f1
refactor: SplitPublicInputsGnark and SplitPublicInputs
Jun 17, 2025
549b20b
feat: U64 -> U32
ThomasPiellard Jun 17, 2025
e4c7b38
refactor: mimc HasherFactory
Jun 17, 2025
32484d4
merge
Jun 17, 2025
e47d3e3
fix go.sum
Jun 17, 2025
084a8cc
refactor: gnarkmimc
Jun 17, 2025
9c53267
refactor: add big int in schema.Walk
Jun 17, 2025
49348d7
refactor: plugin vortex.EvalBasePolyLagrange in gnark-crypto
Jun 17, 2025
d575156
refactor: fix compilation errors
Jun 18, 2025
d2ecf43
refactor: remove errors in merkle test and distributed
Jun 18, 2025
26265f0
debug: added a test for column hash is not using sis hash, fixed wiza…
Jun 19, 2025
db7bdb8
debug: fix registering coin
Jun 19, 2025
b2f9dec
refactor: Vortex with a single round ok
Jun 19, 2025
05efcd8
refactor: compiler/vortex ok
Jun 20, 2025
7e192c4
debug: mpts generic cases
Jun 20, 2025
cba54da
refactor: mpts random coin
Jun 23, 2025
69c8ec3
refactor: cleanup
Jun 24, 2025
e6f3b51
refactor: symbolic ok
Jun 24, 2025
0d5d83f
Prover/koalabear migration rebased bis 2 (#1218)
ThomasPiellard Jun 25, 2025
09fd92f
refactor: make all tests running well
Jun 25, 2025
485da47
cleanup smartvectors
Jun 25, 2025
7b34fd6
refactor: inner product ok
Jun 26, 2025
a1142b2
refactor: fs state
Jun 26, 2025
449e4cf
refactor: test tool
Jun 26, 2025
8ab058e
fix: fixed fs state actions.go
ThomasPiellard Jun 26, 2025
3bf1be7
feat: merge ok
ThomasPiellard Jun 26, 2025
f5f7bb1
fix: evalBiVariate ok
ThomasPiellard Jun 26, 2025
0d7d33a
fix: fixed eval_coeffs
ThomasPiellard Jun 26, 2025
683a663
fix: fixed interpolation.go
ThomasPiellard Jun 26, 2025
69d7e3d
fix: fixed subsample.go
ThomasPiellard Jun 26, 2025
22bbc43
fix: fixed alignment.go
ThomasPiellard Jun 26, 2025
cf4706b
refactor: innerproduct, generic tests, add tests for ext field
Jun 26, 2025
ab5b77e
refactor: check query tests
Jun 26, 2025
c22c67a
clean: multiplyElements -> innerProduct
ThomasPiellard Jun 27, 2025
9e2b039
refactor: logderivative_test.go ok
Jun 27, 2025
5bdb047
refactor: ListOfLogDerivativeSumTestcasePositive ok
Jun 30, 2025
c1dfb24
refactor: add Bogdan's work
Jun 30, 2025
d581a19
refactor: ForExtTest call ForTestFromQuads
Jul 1, 2025
e7da02b
clean: removed unnecessary pointers alloc
ThomasPiellard Jul 1, 2025
074acc2
Merge branch 'prover/fix-compiler-tests' of github.com:Consensys/line…
ThomasPiellard Jul 1, 2025
daae59b
add sanity check to mpts
Jul 1, 2025
038920f
refactor: plonkinternal
Jul 1, 2025
c3d61b9
refactor: dedicated
Jul 1, 2025
d62b3ab
clean: removed unnecesary allocs
ThomasPiellard Jul 1, 2025
1666faf
fix bug in conditional lookups
bogdanbear Jul 1, 2025
6afc444
fix: fixed module_lpp.go
ThomasPiellard Jul 1, 2025
c60431e
feat: merge ok
ThomasPiellard Jul 1, 2025
2ed7ea3
cleanup notes
Jul 1, 2025
0b0a1f9
refactor: query/query_test ok
Jul 1, 2025
e94f63a
wizardutils ok
Jul 1, 2025
047f583
refactor: add a coin type in NewFromCoin
Jul 1, 2025
d6a63f2
refactor: cleanup code
Jul 1, 2025
0f181ee
refactor: add tests TestBatchEvaluateLagrangeExt TestBatchEvaluateLag…
Jul 2, 2025
2b14ee5
refactor: fix some simple errors
Jul 2, 2025
95d72a0
refactor: fix fft fuzzy tests
Jul 2, 2025
00d9411
refactor: fix RandomManyIntegers in fiatshamir
Jul 2, 2025
d489468
clean: removed unused functions
ThomasPiellard Jul 2, 2025
79c50a7
refactor: fix ringsis params_test
Jul 2, 2025
d4dea83
refactor: fix sv.fft
Jul 2, 2025
127f47b
refactor: fix prover/maths/common/smartvectors/arithmetic_ext_test.go
Jul 2, 2025
cd044f2
Merge branch 'prover/fix-compiler-tests' of github.com:Consensys/line…
ThomasPiellard Jul 2, 2025
0627227
refactor: cleanup crypto and math packages, hide gnark and mimc tests
Jul 2, 2025
5dda23d
refactor: hide gnark tests
Jul 2, 2025
b447035
refactor: fix stitchsplit
Jul 2, 2025
08c22cf
refactor: coin type, add FieldExt
Jul 2, 2025
b814e27
refactor: global, should call smartvectors_mixed.Mul->ProductMixed
Jul 2, 2025
93039f0
refactor: global, mpts poly to ext
Jul 2, 2025
01e1951
add a temporaty Makefile
Jul 2, 2025
ae8af02
update Makefile
Jul 2, 2025
a129afb
refactor: fix global, add implementation in accessor, fix EvaluateLag…
Jul 3, 2025
65a323d
cleanup math and crypto
Jul 4, 2025
374f2f0
refactor: random coin -> coinExt
Jul 4, 2025
a038173
clean: clean commitment testing
ThomasPiellard Jul 16, 2025
1ac3ba6
fix: TestComputeLagrangeCircuit ok
ThomasPiellard Jul 18, 2025
39f0528
adapt Bogdan's work, fix GlobalTestcasePositive
Jul 29, 2025
552d060
add EvalXnMinusOneOnACoset, fixGlobalTestcaseNegative
Jul 29, 2025
cd9c9bf
Exporting Fields of GenericFieldElem for Serialization
bogdanbear Jul 29, 2025
322bf5e
fixing more serialization issues.
bogdanbear Jul 29, 2025
4c0a512
refactor: fix coset shift
Jul 30, 2025
fc84298
convert regular_ext back
Jul 30, 2025
fa113db
add observation notes
Jul 30, 2025
c5a3ac1
refactor: fixed global tests
Jul 31, 2025
63f616c
feat: split extension naive version working
ThomasPiellard Aug 4, 2025
b15cfe7
minor
Aug 4, 2025
5c9798b
minor
Aug 4, 2025
c3feff8
feat: clean some for loops
ThomasPiellard Aug 4, 2025
6ade65b
Merge branch 'prover/fix-compiler-tests' of github.com:Consensys/line…
ThomasPiellard Aug 4, 2025
7a4d24e
feat: use AssignUnivariateExt
ThomasPiellard Aug 4, 2025
cbadd22
feat: use ExtYs
ThomasPiellard Aug 4, 2025
900ea81
feat(testtools): adds a prng method for fext vectors in testools
AlexandreBelling Aug 4, 2025
aed8b01
cleanup(split_ext): complete the implementation of the splitext compiler
AlexandreBelling Aug 4, 2025
fd3b70a
testing(splitext): adds a comprehensive testvector for the splitext c…
AlexandreBelling Aug 4, 2025
a87f22b
minor(splitext): rename the package directory splitext to match the n…
AlexandreBelling Aug 4, 2025
b7979b1
minor(splitext): remove outdated comment
AlexandreBelling Aug 5, 2025
31fef38
fix(stitchsplit): fix the stitcher and splitter assignment
AlexandreBelling Aug 5, 2025
6941148
fix(logderivative+perm): assign extensions for the local openings
AlexandreBelling Aug 5, 2025
02d8732
fix(innnerprod): fix the assignment for the inner-product
AlexandreBelling Aug 5, 2025
6420241
testing(innerproduct): adds testcases for the innerproduct
AlexandreBelling Aug 5, 2025
4d47145
fix(stitcher): fix the assignment of the stitcher
AlexandreBelling Aug 5, 2025
892e967
fix div in generic_field_elem to fix permutation tests
Aug 5, 2025
439cc3b
minor(global): rename isNatural to isAssigned for clarify
AlexandreBelling Aug 5, 2025
4f76279
minor(coin): set the coin as FieldExt to avoid any potential future i…
AlexandreBelling Aug 5, 2025
68cd4ac
fix basic tests
Aug 5, 2025
744cf0f
Merge branch 'prover/fix-compiler-tests' of https://github.com/Consen…
Aug 5, 2025
2f41250
testing(innerproduct): adds testcases for the inner-product
AlexandreBelling Aug 5, 2025
f7bd002
fix(global): fix casting bug in the global constraints
AlexandreBelling Aug 5, 2025
a636cc1
Merge branch 'prover/fix-compiler-tests' of github.com:Consensys/line…
AlexandreBelling Aug 5, 2025
127d46f
testing(arcane): reactivate all the tests
AlexandreBelling Aug 5, 2025
8fd3e98
bench(compiler): adds a benchmark for the compiler
AlexandreBelling Aug 6, 2025
ec8c2aa
minor(testing): test using Arcane directly and adds the split extensi…
AlexandreBelling Aug 6, 2025
4de5af2
fix(splitext): marks the old query and the splitted columns as field …
AlexandreBelling Aug 6, 2025
39cd784
fix(bench): sets the SIS threshold to zero as MiMC is not yet supported
AlexandreBelling Aug 6, 2025
215046b
minor(vortex): adds a sanity-check that the roundStatus vector lines …
AlexandreBelling Aug 6, 2025
49c0b8b
perf(smallfields): adds a larger test to benchmark the small fields
AlexandreBelling Aug 6, 2025
3ce39c5
fix(vortex): remove the RoundStatus sanity-check as it is broken with…
AlexandreBelling Aug 6, 2025
54eba32
fix(splitext): makes the compiler work when there are multiple rounds
AlexandreBelling Aug 6, 2025
6008173
feat(splitext): use the batchpoly evaluation algorithm for the Y coor…
AlexandreBelling Aug 6, 2025
d78cc3b
add TestCompilers in makefile, cleanup horner and projection tests, r…
Aug 6, 2025
c25fbf3
Merge branch 'prover/fix-compiler-tests' of https://github.com/Consen…
Aug 6, 2025
3a32135
Merge branch 'main' of github.com:Consensys/linea-monorepo into prove…
AlexandreBelling Aug 8, 2025
7b5813a
Merge remote-tracking branch 'origin/prover/fix-compiler-tests' into …
AlexandreBelling Aug 8, 2025
3354b71
minor(vortex): fix the vortex compiler tests (#1311)
AlexandreBelling Aug 15, 2025
91172d6
Prover/add panic to smartvectors (#1312)
YaoJGalteland Aug 25, 2025
65f60f8
Prover/fix poseidon2 compiler (#1349)
YaoJGalteland Sep 8, 2025
b4709f5
feat: use latest gnark-crypto and update vector wrapper on E4 for now
gbotrel Sep 8, 2025
6b8014f
Prover/vortex default poseidon2 (#1368)
YaoJGalteland Sep 9, 2025
46e98e9
perf: revamp `symbolic.EvalBoard` (#1404)
gbotrel Sep 9, 2025
bf6c222
Prover/fft optimization (#1378)
YaoJGalteland Sep 9, 2025
c9ed633
perf(mpts): use the batch evaluate lagrange function (#1307)
AlexandreBelling Sep 11, 2025
78adca3
Revert "perf(mpts): use the batch evaluate lagrange function (#1307)"
YaoJGalteland Sep 11, 2025
b3dc2e0
Prover/mpts (#1419)
YaoJGalteland Sep 11, 2025
c0543c8
test: use uint32 mod directly for pseudo rand, no big int
gbotrel Sep 12, 2025
175a0cb
perf: better transversal hash and improve split extension (#1434)
gbotrel Sep 16, 2025
a0b0f70
Prover/batch lagrange mpts (#1424)
YaoJGalteland Sep 16, 2025
8f21028
perf: small field prover improvements (#1446)
gbotrel Sep 17, 2025
94b6d03
refactor: kill fft wrappers
gbotrel Sep 17, 2025
d6dd51a
fix for plonk alignment_test
bogdanbear Sep 18, 2025
ef7c24f
perf,refactor: use gnark-crypto vector for e4, clean up prover small …
gbotrel Sep 18, 2025
9f1bad0
fix: fix broken test
gbotrel Sep 18, 2025
809d330
perf,style: simplify BatchEvaluateLagrange
gbotrel Sep 19, 2025
4ec48fa
perf: RandLinCombColAssignment rewritten to avoid excessive memallocs
gbotrel Sep 19, 2025
5d4cee1
style: cosmetics
gbotrel Sep 19, 2025
bf4a055
perf: hunt for mem allocs
gbotrel Sep 19, 2025
b21cf47
feat: add utils/scratch.go and do fft on base field in quotient
gbotrel Sep 19, 2025
678910d
style: remove uneeded constants
gbotrel Sep 19, 2025
ecaac12
feat: use prefix product in parallel and ensure intoRegSaveAlloc does…
gbotrel Sep 19, 2025
3ec12ed
fixing protocol/.../plonkinternal/ tests
bogdanbear Sep 23, 2025
16f71af
fix: solving failing tests in protocol/.../plonkinternal
bogdanbear Sep 24, 2025
e475563
fix: working tests in protocol/dedicated/functionals/
bogdanbear Sep 24, 2025
807a708
fix: one of the commitment tests for protocol/.../plonkinternal
bogdanbear Sep 25, 2025
1677593
fix: more extension methods for accessors
bogdanbear Sep 25, 2025
1b9beb2
perf: prover small fields improvments (#1487)
gbotrel Sep 29, 2025
3fe791d
perf: tuning
gbotrel Sep 30, 2025
2a094b4
Fix selfrecursion (#1500)
YaoJGalteland Oct 3, 2025
e1cb771
Implement Poseidon2FieldHasherDigest and integrate into Vortex and Fi…
YaoJGalteland Oct 20, 2025
ae30b9a
Prover/optimize poseidon2 compiler small fields (#1528)
AlexandreBelling Oct 21, 2025
5039c4b
Cleanup Poseidon2 and Mimc (#1621)
YaoJGalteland Oct 23, 2025
249918a
chores(limitless): flat copy the content of f5a9367 into protocol/dis…
AlexandreBelling Oct 27, 2025
c302fdd
Prover: use Poseidon for the small fields hashes (#1635)
AlexandreBelling Oct 27, 2025
1399ddc
Optimize poseidon2 compiler to reduce proof size (#1632)
YaoJGalteland Oct 27, 2025
ba96d12
fix: a merge problem, naming change
YaoJGalteland Oct 27, 2025
673c67c
Migrating the state-manager to small fields, poseidon2 encoding (#1644)
YaoJGalteland Oct 30, 2025
8380606
testing(poseidon2): adds test vectors for the Poseidon2 hasher for ma…
AlexandreBelling Nov 3, 2025
3dc9421
Merge branch 'prover/dev-small-fields' of github.com:Consensys/linea-…
AlexandreBelling Nov 3, 2025
fb765b8
update test vectors
YaoJGalteland Nov 5, 2025
e4ba279
Feature/glue over koalabear (#1692)
AlexandreBelling Nov 5, 2025
3b54eae
feat: support PLONK-in-Wizard for smallfields (#1697)
ivokub Nov 6, 2025
64d2336
Add testvectors for accumulator (#1700)
YaoJGalteland Nov 6, 2025
752681c
initilize theta step
Soleimani193 Oct 13, 2025
599723f
interface for theta and roh steps
Soleimani193 Oct 14, 2025
7c18df1
cleaned interface
Soleimani193 Oct 14, 2025
0cfac65
minor
Soleimani193 Oct 14, 2025
c1931d1
constraints over inputs, absorbing blocks into state
Soleimani193 Oct 14, 2025
3fc1426
start implementation of rho step
Soleimani193 Oct 16, 2025
1e1cfc7
rotation step
Soleimani193 Oct 17, 2025
976f04a
added prover action for linear combination
Soleimani193 Oct 17, 2025
435ed27
seperated base conversion, added rho test
Soleimani193 Oct 20, 2025
b4eba65
test for rho step is passing
Soleimani193 Oct 21, 2025
926d7bb
cleaning
Soleimani193 Oct 21, 2025
cf5b8c9
defining chi constraints
Soleimani193 Oct 21, 2025
86a9156
chi assignment wip
Soleimani193 Oct 23, 2025
1c59b7e
test for chi
Soleimani193 Oct 24, 2025
75fd9c4
debugging wip
Soleimani193 Oct 27, 2025
5e5929f
test for chi is passing
Soleimani193 Oct 27, 2025
7e720a9
integrating iota step
Soleimani193 Oct 27, 2025
ce187ff
fixed the bug for round constant in chi step
Soleimani193 Oct 28, 2025
ef873a6
wip debugging integration
Soleimani193 Oct 28, 2025
4b7677f
test passing for the message integration into chi step
Soleimani193 Oct 29, 2025
5aa8078
testing base conversion BaseChi to BaseTheta
Soleimani193 Oct 29, 2025
60fab94
state conversion from iota back to theta
Soleimani193 Oct 30, 2025
204ba71
added constraints for iota to theta
Soleimani193 Oct 30, 2025
82e4877
debugging wip
Soleimani193 Nov 4, 2025
9c90e6b
test for keccakf input preparation passes
Soleimani193 Nov 5, 2025
d549c0e
prover action for to-basex
Soleimani193 Nov 5, 2025
c9a1ef9
debuggin io keccakf initial circuit test passes
Soleimani193 Nov 6, 2025
0fa9800
io-keccakf is passing with all constraints.
Soleimani193 Nov 7, 2025
90c3509
cleaning
Soleimani193 Nov 7, 2025
731fc04
to base 2 for output
Soleimani193 Nov 12, 2025
099991f
added output layer
Soleimani193 Nov 12, 2025
2255fd5
Prover/KeccakF Theta for Small Field (#1605)
arijitdutta67 Nov 13, 2025
f919277
keccakf integration
Soleimani193 Nov 14, 2025
c14f1eb
cleaning
Soleimani193 Nov 14, 2025
08680f7
minor
Soleimani193 Nov 14, 2025
9297a22
typos
Soleimani193 Nov 14, 2025
b8c5872
fixed complains on InsertCommit
Soleimani193 Nov 18, 2025
f90f462
packing module is working
Soleimani193 Nov 18, 2025
9d79480
kaccak over blocks wip
Soleimani193 Nov 19, 2025
d3e3073
keccak over blocks passes
Soleimani193 Nov 21, 2025
170d153
keccak zkevm test passes
Soleimani193 Nov 24, 2025
f34f27c
keccak koalabear package cleaning
Soleimani193 Nov 24, 2025
5fe1cc7
cleaning
Soleimani193 Nov 24, 2025
28422b5
sha2 migration to koalabear
Soleimani193 Nov 26, 2025
71342e2
padding packing for poseidon2
Soleimani193 Nov 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/prover-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ jobs:
working-directory: prover
run: if [[ -n $(gofmt -l .) ]]; then echo "please run gofmt"; exit 1; fi
- name: golangci-lint
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 #v6.5.2
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 #v8
with:
version: v1.61.0
version: v2.1.6
working-directory: prover
args: --timeout=5m
- name: generated files should not be modified
Expand Down
2 changes: 1 addition & 1 deletion constraints
2 changes: 1 addition & 1 deletion go-corset
Submodule go-corset updated 220 files
97 changes: 97 additions & 0 deletions prover/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
*.pprof
*.trace
**/*.DS_Store
**/.ipynb_checkpoints
**/__pycache__
**/debug.log
**/*.lisp
lispified
**/profiling
!utils/profiling
**/large_data
**/*-*-zkProof.json
**/proving_key.bin
!**/verifying_key.bin
**/circuit.bin
prover/zkevm/arithmetization/zkevm.bin



# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
__pycache__
bin/
vendor/
.env

# except for single-round bin
!**/single_round/bin/

!/**/.gitkeep

# Test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Coverage
coverage.html
*.cov.tmp

# Jetbrains files
.DS_Store
.idea
*.iml
.idea_modules/

# Build
build/
cmake-build-*/

# File-based project format
*.iws
*.ipr

# JIRA plugin
atlassian-ide-plugin.xml

# Go packages and sources:
.gocache

# Visual Code Studio
.vscode

!**/**/.gitkeep

# API Doc
node_modules

# Various logging outputs
**/*.csv
**/*.log
!**/testdata/**/*.csv

# Output of the generator command
test-data

# Testdata, otherwise that's 400MB of data downloaded
integration-testing/testdata/prover-requests/

# Authorize the kzg srs folder
prover-assets/**
!prover-assets/kzgsrs/**

# Handy for the pprof generated pdf
**/*.pdf

# For the json, csv and txt files generated while debugging the limitless prover
# OK to remove eventually.
protocol/distributed/**/*.json
protocol/distributed/**/*.txt
protocol/distributed/**/*.csv

68 changes: 36 additions & 32 deletions prover/.golangci.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,41 @@
version: "2"
run:
issues-exit-code: 1
linters:
disable-all: true
# @alex: we will need to sort out the linters because they take too much time
# and memory to run practically since we merged go-corset. We shall revise
# our toolset.
default: none
enable:
- gofmt
# - staticcheck
- gosec
# - gosimple
# - govet
- ineffassign
- prealloc

run:
issues-exit-code: 1
# List of build tags, all linters use it.
# Default: [].
# build-tags:

issues:
exclude-dirs:
- compressor
- zkevm/arithmetization
exclude:
# Only appears on CI
- '.*printf: non-constant format string in call to.*'

linters-settings:
staticcheck:
checks:
- all
- '-SA1019' # disable the rule against deprecated code
- '-SA1006'
gosec:
excludes:
- G115 # Conversions from int -> uint etc
settings:
gosec:
excludes:
- G115
staticcheck:
checks:
- -SA1006
- -SA1019
- all
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- path: (.+)\.go$
text: '.*printf: non-constant format string in call to.*'
paths:
- compressor
- zkevm/arithmetization
- third_party$
- builtin$
- examples$
formatters:
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
47 changes: 46 additions & 1 deletion prover/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,32 @@ DARWIN_ARM64_FLAGS := CGO_ENABLED=1 GOOS="linux" GOARCH="arm64"
# Ensure that we are using go-corset from the monorepo
GO_CORSET := PATH="${CORSET_ROOT}/bin":$$PATH

# Define the list of Go packages to test
PACKAGES := \
github.com/consensys/linea-monorepo/prover/maths/... \
github.com/consensys/linea-monorepo/prover/crypto/... \
github.com/consensys/linea-monorepo/prover/symbolic/... \
github.com/consensys/linea-monorepo/prover/utils/types/... \
github.com/consensys/linea-monorepo/prover/protocol/accessors/... \
github.com/consensys/linea-monorepo/prover/protocol/query/... \
github.com/consensys/linea-monorepo/prover/protocol/wizard/... \
github.com/consensys/linea-monorepo/prover/protocol/wizardutils/... \
github.com/consensys/linea-monorepo/prover/protocol/compiler/globalcs/... \
github.com/consensys/linea-monorepo/prover/protocol/compiler/innerproduct/... \
github.com/consensys/linea-monorepo/prover/protocol/compiler/mpts/... \
github.com/consensys/linea-monorepo/prover/protocol/compiler/logderivativesum/... \
github.com/consensys/linea-monorepo/prover/protocol/compiler/vortex/... \
github.com/consensys/linea-monorepo/prover/protocol/compiler/dummy/... \
github.com/consensys/linea-monorepo/prover/protocol/compiler/localcs/... \
github.com/consensys/linea-monorepo/prover/protocol/compiler/permutation/... \
github.com/consensys/linea-monorepo/prover/protocol/compiler/specialqueries/... \
github.com/consensys/linea-monorepo/prover/protocol/compiler/stitchsplit/... \
github.com/consensys/linea-monorepo/prover/protocol/compiler/univariates/... \
github.com/consensys/linea-monorepo/prover/protocol/dedicated/...\
github.com/consensys/linea-monorepo/prover/protocol/compiler/selfrecursion/...\



# these targets are not defined as depending on source files,
# so they should be recompiled by default “just in case”.
.PHONY: \
Expand All @@ -28,7 +54,12 @@ GO_CORSET := PATH="${CORSET_ROOT}/bin":$$PATH
bin/checker \
go-corset \
testdata \
test-compilers \
test \
clean

# Default target: runs all tests
all: test-compilers test

##
## This rule produces the go-corset binary
Expand Down Expand Up @@ -131,7 +162,15 @@ lib/compressor-and-shnarf-calculator-local: lib/compressor lib/shnarf_calculator
## Run all the unit-tests
##
test:
go test -tags debug ./...
@echo "Running all Go tests for Linea Monorepo prover packages..."
@for pkg in $(PACKAGES); do \
echo "--> Running tests for $$pkg"; \
go test -tags debug -skip 'Gnark|TestSelfRecursionManyLayersWithSerde' $$pkg || exit 1; \
done
@echo "All tests completed successfully."

test-compilers:
go test -timeout 30s -run ^TestCompilers$$ github.com/consensys/linea-monorepo/prover/protocol/compiler

##
## Run the CI linting
Expand All @@ -151,3 +190,9 @@ cgo-flags:
make update-testdata-for-coordinator:
go test -timeout 30m -tags amd64,nocorset -run TestSamples github.com/consensys/linea-monorepo/prover/backend/testing -v
cp -f backend/testing/**/*-*-zkProof.json ../testdata/prover/output

# Target to clean Go build cache (optional, but good practice)
clean:
@echo "Cleaning Go build cache..."
@go clean -testcache
@echo "Go build cache cleaned."
31 changes: 31 additions & 0 deletions prover/backend/execution/prove.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@ package execution

import (
"fmt"
"math/rand/v2"
"os"
"path/filepath"
"runtime"
"strconv"
"time"

"github.com/consensys/gnark-crypto/ecc"
"github.com/consensys/linea-monorepo/prover/circuits"
"github.com/consensys/linea-monorepo/prover/circuits/dummy"
"github.com/consensys/linea-monorepo/prover/circuits/execution"
"github.com/consensys/linea-monorepo/prover/config"
"github.com/consensys/linea-monorepo/prover/protocol/serialization"
public_input "github.com/consensys/linea-monorepo/prover/public-input"
"github.com/consensys/linea-monorepo/prover/utils"
"github.com/consensys/linea-monorepo/prover/utils/exit"
Expand Down Expand Up @@ -189,6 +195,31 @@ func mustProveAndPass(
logrus.Infof("Prover checks passed")
return "", ""

case config.ProverModeEncodeOnly:

profiling.ProfileTrace("encode-decode-no-circuit", true, false, func() {
filepath := "/tmp/wizard-assignment/blob-" + strconv.Itoa(rand.Int()) + ".bin" //nolint:gosec // Ignoring weak randomness error

encodeOnlyZkEvm := zkevm.EncodeOnlyZkEvm(traces)
numChunks := runtime.GOMAXPROCS(0)

// Serialize the assignment
encodingDuration := time.Now()
encodeOnlyZkEvm.AssignAndEncodeInChunks(filepath, w.ZkEVM, numChunks)

// Deserialize the assignment
decodingDuration := time.Now()
_, errDec := serialization.DeserializeAssignment(filepath, numChunks)
if errDec != nil {
panic(fmt.Sprintf("Error during deserialization: %v", errDec))
}
fmt.Printf("[Encoding Summary] took %v sec to encode an assignmente and write it into the files \n", time.Since(encodingDuration).Seconds())
fmt.Printf("[Decoding Summary] took %v sec to read the files and decode it into an assignment\n", time.Since(decodingDuration).Seconds())
})

os.Exit(0)
return "", ""

default:
panic("not implemented")
}
Expand Down
26 changes: 13 additions & 13 deletions prover/backend/execution/statemanager/worldstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
const WS_LOCATION = "0x"

var MIMC_CONFIG = &smt.Config{
HashFunc: hashtypes.MiMC,
HashFunc: hashtypes.Poseidon2,
Depth: 40,
}

Expand Down Expand Up @@ -46,12 +46,12 @@ func EmptyCodeHash(config *smt.Config) Digest {
// Returns an EOA account
func NewEOA(config *smt.Config, nonce int64, balance *big.Int) Account {
return types.Account{
Nonce: nonce,
Balance: balance,
StorageRoot: EmptyStorageTrieHash(config), // The eth
MimcCodeHash: EmptyCodeHash(config),
KeccakCodeHash: types.AsFullBytes32(LEGACY_KECCAK_EMPTY_CODEHASH),
CodeSize: 0,
Nonce: nonce,
Balance: balance,
StorageRoot: EmptyStorageTrieHash(config), // The eth
Poseidon2CodeHash: EmptyCodeHash(config),
KeccakCodeHash: types.AsFullBytes32(LEGACY_KECCAK_EMPTY_CODEHASH),
CodeSize: 0,
}
}

Expand All @@ -65,12 +65,12 @@ func NewContractEmptyStorage(
codeSize int64,
) types.Account {
return types.Account{
Nonce: nonce,
Balance: balance,
StorageRoot: EmptyStorageTrieHash(config),
MimcCodeHash: codeHash,
KeccakCodeHash: keccakCodeHash,
CodeSize: codeSize,
Nonce: nonce,
Balance: balance,
StorageRoot: EmptyStorageTrieHash(config),
Poseidon2CodeHash: codeHash,
KeccakCodeHash: keccakCodeHash,
CodeSize: codeSize,
}
}

Expand Down
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
4 changes: 2 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 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
Loading