178 Commits

Author SHA1 Message Date
Victorien Gauch
d9353756ee Fix: update contracts folder structure (#420)
* fix: update contracts folder structure

* fix: update contracts documentation

* fix: regenerate docs

* fix: remove .md file in solidity docs folder

* fix: rename Utils contract + update autoupdate script

* fix: update solidity doc

* fix: clean test contracts folder structure

* fix: clean test folder structure

* fix: update autoupdate.sh script

* fix: update solcover file

* fix: remove static nonce in LineaRollup test

* Merge branch 'main' into fix/399-update-contracts-folder-structure

* remove files in merge conflict

* fix prover reference for Mimc.sol

* fix: update docs

* fix: remove unused files

* point to correct folders in readmes

---------

Co-authored-by: thedarkjester <grant.southey@consensys.net>
2025-01-29 10:32:31 +01:00
Lakshminarayanan Nandakumar
bb838db60e set aggregation prover priority to low (#591) 2025-01-22 14:17:59 +01:00
Arya Tabaie
543aedd23f Feat/multi dict prover (#553)
* refactor: disallow explicit dictionaries for anything other than v0 decompression setup

* refactor: pass around dictionary stores instead of individual dictionaries

* feat: add new dictionary

---------

Co-authored-by: Arya Tabaie <15056835+Tabaie@users.noreply.github.com>
2025-01-21 09:38:45 -06:00
Bogdan Ursu
db311708a4 Prover/feat/Adding field extension support to Smartvectors (#569)
* field extension support for the maths package
2025-01-17 17:37:39 +01:00
AlexandreBelling
aeb86855ae Prover: connect the codehash and the statesummary module (#463)
* clean(prover): more hilo into zkevm/prover/common

* feat(codehash): implements the module connecting the codehash and the statesummary

* clean(ss): apply the changes for the statesummary

* feat(rand): moves everything to use rand/v2

* feat(csv): adds WriteExplicit

* feat(codehash): implements the consistency module

* fix(rng): Int31n -> Int32N

* fix(lint): pass the use of test-rng

* clean: clean one of the comment to remove debugging data

* fix(test): fix conversion test and also simplify the use of rng

* feat(codehash): enable the codehash consistency module

* reconnect the execution data hasher with the public input

* revert the rand/v2 for the testcase-gen of the contracts
2025-01-16 22:31:15 +01:00
Ivo Kubjas
05d3ee2875 fix(ecpair): ensure last non-trivial input pair goes to ML+finalexp circuit (#524)
* fix: set inputresult only once

* fix: copy only actual inputs going to pairing (no trivial pairs)

* fix: non-exclusive G2 membership or pairing check

* fix: enable index consistency check when interleaved G2 membership

We may interleave in the same rows the G2 membership and pairing check
inputs. Currently when we have interleaved then we disable the index
consisitency check.

* fix: do not project pair IDs and total pairings

* fix: add constraint to check totalpairs correctness

* test: add IS_RESULT column to test cases and uniform reformat

* feat: allow outputting CSV in hex

* feat: add utility method to write the module

* test: check also IS_RESULT in test cases

* test: add test case modules

* test: add regression test case

* feat: add testdata generator for ecpair

* feat: add tests for manual generation of EC edge cases

* fix: accumulator consistency assignment in case of one valid point

* docs: describe assignment

* fix: indexing when non-sequential valid points

* test: run tests on generated data

* feat: generate all cases for 1-5 input pairs

* test: skip long tests

* fix: test imports

* enable ecpair

* perf: parallelize testcase testing

---------

Co-authored-by: gusiri <dreamerty@postech.ac.kr>
2025-01-16 13:24:04 +01:00
Pedro Novais
6e157404b6 prover: Dockerfile remove legacy/unused data/work folder (#537) 2025-01-13 14:21:27 +00:00
AlexandreBelling
35a8ded680 bench(sis): adds a benchmark for the ringsis hash (#511)
* bench(sis): adds a benchmark for the ringsis hash
2025-01-08 23:17:09 +01:00
AlexandreBelling
2fb12b90a7 Prover: new beta-v1 contract (#504)
* feat: reactivate the ecadd module

* feat: add the new contract (in prover folder)

* chores: move the plonk verifier in the contract folder
2025-01-08 11:10:02 +01:00
AlexandreBelling
574e0efe32 Prover: prerelease fixes (#503)
* feat(setup): run setup in deterministic order
* fix(pubinp): fix the public input names
* fix(gate-wire): bumps gnark's version to incorporate the fix
* feat(dummy): the dummy prover does not change the columns status anymore
* tmp(ecpair): deactivate the ecpair module
2025-01-07 19:29:47 +01:00
AlexandreBelling
3b875fd8d6 Prover/full recursion (#350)
* (feat): Implements the full-recursion and test for a simple test
* msg(sticker): better error in the sticker
* test(full-recursion): adds a test for double full-recursion (overflowing memory)
* fix: sort out the packages after rebasing
* fix(pi): renaming of the public inputs
* fix(hasher): adjust the code to using a [hash.StateStorer]
* fix(pairing): pass the new format for fp12 elements
* doc(plonk): adds more doc in plonk.alignment.go
* doc(fs-hook): improves the documentation of the FiatShamirHook field.
* docs(skipping): adds doc on the ByRoundRegister
* feat(pubinp): move the zkevm public inputs to using the new public-input framework
* doc(column-store): adds documentation for the more precise methods regarding the inclusion in the FS transcript.
* clean(self-recursion): remove the self-recursion tuning file
* doc(vortex): explain the separation between the verifier steps
* doc(full-recursion): documents the prover and verifier actions
* doc(columns): improve the documentation on the IncludeInProverFS
2025-01-06 09:52:01 +01:00
Arijit Dutta
9dc4304846 Prover/Global Constraint Boundary Cancellation Explainer (#335)
* minor typo fix
* comments in the test to show bounadary cancellation
2025-01-06 09:10:04 +01:00
Arya Tabaie
3805acbffe Compressor Optimizer (#367)
* refactor: synchronous optimization

---------

Signed-off-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
Co-authored-by: Arya Tabaie <15056835+Tabaie@users.noreply.github.com>
2024-12-24 13:08:27 -06:00
Bogdan Ursu
972cc85c88 Prover/feat/small field exploratory—Smartvectors that support both base field elements and field extensions. (#469)
* degree-2 extension poc

* refactor

* refactor

* templating smartvectors

* smartvectors wip

* helper functions, wip

* utilfunctions wip

* remove templating from RandVect

* REVERT templating in smartvectors

* api changes in existing smartvector types

* filling gaps in the base API

* intermediary Get function

* bug fixes

* mempool for fext

* fext vectors, wip

* code for ext types of smartvector

* bug fix in isZero

* arithmetic_test for extended smartvectors, wip

* rotated ext test

* window ext test

* setInt and setUint touch only one coordinate

* removed field amd files

* another intemediary function

* linter errors, wip

* prunning fext, attempting to fix linter errors

* cosmetic change

* Update vectorext.go

* changing build flags

* build flags + removed fieldElement interface

---------

Co-authored-by: AlexandreBelling <alexandrebelling8@gmail.com>
2024-12-20 17:26:26 +01:00
Lakshminarayanan Nandakumar
a83d22cafe #461 Prover: Add constraints version validation (#470)
* edit Makefile

* edit prover Makefile to capture tracefile dep.

* added prover arithmetization version validation check

* added regex check for conflated trace files

* add log msgs to prover validation checks

* add check for traces engine version and conflated trace file

* impl soft changes

* impl soft changes and replace zkevm.bim with version from main branch

* replace config-sepolia-full.toml with the version from main branch

* undo change to set the conflate dir to default value

* fix typo in comments

* embed constraint version files at compile time

* update regex check to include optional dir path in trace file
2024-12-19 21:03:49 +01:00
AlexandreBelling
7a67a213ff Prover: fix full prover over Sepolia issues (#448)
* fix(execution): assigns the functional public inputs
* revert(execution): reinstate the panic if the traes do not match the checksum.
* clean(circuit): remove the systematic circuit profiling
* fix(pi-interconnection): fix the check on the aggregation circuit
* chores(prover): remove the overly verbose log
* chores(zkevm.bin) commit the updated zkevm.bin
* fix(public-input): point to data_hilo instead of addr_hilo
* fixup: pi-interconnection fix in the circuit and the assignment

---------

Co-authored-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
2024-12-18 23:26:30 +01:00
AlexandreBelling
8fa0a1c751 chores(corset): remove rust corset from the docker build (#419) 2024-12-18 23:25:50 +01:00
AlexandreBelling
a4dbf570b4 err(modexp): returns a 77 error when modexp overflows (#388) 2024-12-18 19:56:54 +01:00
AlexandreBelling
89c048bd29 Prover: fix empty to address decoding (#403)
* test and fix the encoding-decoding of transaction with an empty to

* fix typo

* readd the explicit test case

* fix: move decompressBlob out of the "no-CI" build tag

* fix tag confusion

* Fix prover libs CI release  (#450)

* prover: try to fix native libs arm build

---------

Signed-off-by: AlexandreBelling <alexandrebelling8@gmail.com>
Co-authored-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
Co-authored-by: Pedro Novais <1478752+jpnovais@users.noreply.github.com>
2024-12-16 13:31:53 +01:00
AlexandreBelling
c2272f60da fix(prod): removes check failing on prod. (#442)
* fix(prod): removes check failing on prod.
* add log
2024-12-12 22:43:49 +01:00
Leo Jeong
766d43d16d Prover: bump to v0.8.0-rc8 sepolia release (#435)
* bump to v0.8.0-rc8 sepolia release

* bump to v0.8.0-rc8
2024-12-12 01:04:47 +09:00
AlexandreBelling
0bcfa5e26a Revert "Revert: Prover: bump to arithmetization beta-v0.8.0-rc6 (#362) (#371)" (#418)
This reverts commit 8be665e11c.
2024-12-10 16:09:06 +01:00
AlexandreBelling
c511121317 Prover: couple of fixes betav1 (#377)
* fix(execution): a few fixes in the wizard verifier

* feat(dict): pass the dict path from config

* fix: makeBw6Proof returns circuitID instead of -1

* fix(circuitID): make bw6Proof returns the circuitID

* fix(config-testing)

* feat(config): sepolia-full uses full aggregation

* style(naming): renaming the rolling hash fields and documenting the checks in pi-interconnection

* feat: flag for target number of constraints

* fix refactoring oversight

---------

Co-authored-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
2024-12-10 15:55:20 +01:00
Arya Tabaie
c4c3bfd739 Feat Setup checks equality between KZG Vk from circuit Vk and from SRS (#325)
* feat test vk consistency
* test write-read setup
* feat readfromfile-writetofile

---------

Co-authored-by: Arya Tabaie <15056835+Tabaie@users.noreply.github.com>
2024-12-02 14:45:15 +01:00
AlexandreBelling
8be665e11c Revert: Prover: bump to arithmetization beta-v0.8.0-rc6 (#362) (#371)
* Revert "Prover: bump to arithmetization beta-v0.8.0-rc6 (#362)"

This reverts commit 31389b1304.
2024-12-02 14:35:53 +01:00
Arya Tabaie
02d13d1947 Fix PI Initial Rolling Hash Update (#360)
* fix rolling hash updates in collectFields

* fix initial rolling hash in piq

* fix assignment rolling hash logic

* docs give names to all checks

* docs point out checks in circuit

* refac check for chain id etc first

---------

Co-authored-by: Arya Tabaie <15056835+Tabaie@users.noreply.github.com>
Co-authored-by: AlexandreBelling <alexandrebelling8@gmail.com>
2024-11-30 10:26:19 -06:00
AlexandreBelling
31389b1304 Prover: bump to arithmetization beta-v0.8.0-rc6 (#362)
* bump to arithmetization beta-v0.8.0-rc6
* fix: use the appropriate go-corset version
2024-11-29 18:56:58 +01:00
AlexandreBelling
35700222f8 Feature/optimization distributedlab rebased (#356)
* fft optimization: used parallel approach from gnark-crypto

* following OmegaTymbJIep: Use atomic uint instead of the chan of uints in parallel task tracking

* Adding bitreverse from gnark-crypto

* Use atomic counter instead of uint chan to avoid locks

* Add test for AtomicCounter

* fixed build issues due to changes in keccak

* increase butterflyThreshold (because we now use kerDITNP_256 instead of kerDITNP_8)

* rollback butterflyThreshold

* adding check for nBTasks in parallel.execute

* using GOMAXPROCS instead of NumCPU

* adding execution pool

* fixed initializing thread pool

* adding ExecutePoolChunkyWithCache

* returning back from ExecutePoolChunkyWithCache to ExecutePoolChunky, adding ExecutePoolChunky to multi_to_single_point.go

* adding ExecutePoolChunkyWithAllocated

* replacing ExecutePoolChunky with ExecuteChunky in InitOpeningWithLC

* returning back  ExecutePoolChunky in InitOpeningWithLC, adding additional ExecutePoolChunky into quotient

* replacing ExecutePoolChunky with Execute into quotient

* fix: removing redundant mainWg in multi_to_single_point.go

* fix multi_to_single_point.go councurency waitning, retry quotient with ExecutePoolChunky

* ExecutePoolChunky in opening_prover.go, rolling back quotient.go

* ExecutePoolChunky in multi_to_single_point.go

* removing mutexes from quotient

* Avoid redundant bigint allocations

* fixed pool - removing redundant

* fixed - removing redundant comments

* removing keccak optimization

---------

Co-authored-by: olegfomenko <oleg.fomenko2002@gmail.com>
Co-authored-by: Anton Levochko <hykakdela@gmail.com>
2024-11-28 23:17:41 +01:00
AlexandreBelling
3ecd75034d fix(keccak-pi): exposes the statement of the keccak in wizard. (#319)
Co-authored-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
2024-11-25 20:51:35 +01:00
Arya Tabaie
521f90b8b9 Chore/prover/adjust compression max (#313)
* feat command line arguments for blob size maximizer

* chore adjust blob size
2024-11-25 10:41:13 +00:00
Arya Tabaie
c4abdd9202 Fix PI prover nil reference bug (#312)
* fix get setup first
* don't "overbatch"

---------

Co-authored-by: Arya Tabaie <15056835+Tabaie@users.noreply.github.com>
2024-11-22 20:14:38 +00:00
AlexandreBelling
c0b28f1970 Prover: adds field dict_path in config (#314)
* feat(conf): adds a config field to explicitly set the dictionary path
* fix(typo): prover assets path
* fix(e2e): specifies an explicit dict path
* comment(dict_path): adds a comment stressing to not use the field outside E2E testing context.
2024-11-20 14:38:52 +01:00
Arya Tabaie
0615fa37b9 refactor prove/setup args (#288)
* refactor prove/setup args

* refac contain global variables in the main package

* refactor eliminate unnecessary arguments
2024-11-19 15:47:55 -06:00
Arya Tabaie
93366e5b02 Prover: adds gnark options to public input proof for efficiency (#293)
* fix prover options for decomp

* perf batch all proofs

* skip tests
2024-11-19 15:31:27 -06:00
Arya Tabaie
6d76c525f7 test cache proofs for tests/debugging (#297)
* test cache proofs for tests
2024-11-19 15:07:42 -06:00
Arya Tabaie
d686f1b2ce Prover: perf load setup in parallel to compilation and assignment (#289)
* perf load setup in parallel to compilation and assignment
* style gofmt
* fix use waitgroup instead of channel

---------

Co-authored-by: Arya Tabaie <15056835+Tabaie@users.noreply.github.com>
2024-11-19 14:19:30 -06:00
AlexandreBelling
a29c4d99e0 Fix(tests): fix the failing tests (#308) 2024-11-19 15:36:47 +01:00
Håvard Anda Estensen
9713fef2a6 perf(prover): preallocate slices (#119)
* chore(prover): add prealloc linter
* perf(prover): preallocate slices
2024-11-19 10:19:50 +01:00
AlexandreBelling
0b797594bd Prover: apply the AVX optimizations for math/vector (#185)
* feat: apply the AVX optimizations
* style: remove redundant boundary check
2024-11-19 09:30:42 +01:00
Arya Tabaie
d9cfcef041 feat decompression dummy proof (#290)
Co-authored-by: Arya Tabaie <15056835+Tabaie@users.noreply.github.com>
2024-11-19 09:13:34 +01:00
Arya Tabaie
c847eb2441 Match PI assignment and circuit with aggregation backend (#274)
* fix: initialBlockNum -> lastFinalizedBlockNum

* fix more execution pi logic

* feat readHashSnark

* fix block num comparisons

* feat pretty print hashes

* feat some more range checks

* fix exec.lastFinalizedTS -> initialTS

* feat skip wizard subproof

* feat always zero pad unused PI proofs
2024-11-05 10:32:32 -06:00
Arya Tabaie
0de0897044 Fix/prover/aggregation/tree padding (#262)
* feat hash wrappers for testing

* feat not so strict hasher

* fix integrate flexible hashes into PI circuit

---------

Co-authored-by: Arya Tabaie <15056835+Tabaie@users.noreply.github.com>
2024-10-30 12:48:10 -05:00
Arya Tabaie
a306bcb78b fix don't assume zero-padded lanes (#267)
Co-authored-by: Arya Tabaie <15056835+Tabaie@users.noreply.github.com>
2024-10-30 11:37:58 -05:00
Arya Tabaie
ba8405bb92 fix revert in accordance with comments (#114)
Co-authored-by: Arya Tabaie <15056835+Tabaie@users.noreply.github.com>
2024-10-28 09:20:49 +01:00
Arijit Dutta
db82f0ff88 Prover/Constraint for IsInsertRow3 (#147)
* added constraint for IsInsertRow3
2024-10-26 11:38:39 +02:00
Arijit Dutta
e84b088eb6 Adding more constraints for IsEmptyLeaf (#146)
* adding constraints for IsEmptyLeaf
2024-10-26 11:30:59 +02:00
Arijit Dutta
333adfca3e Prover/constraint for the update operation (#149)
* added constraint for the update operation
* removed ifaces.ColumnAsVariable
2024-10-25 22:52:40 +02:00
Bogdan Ursu
4f4be5792c Prover Bug Fix—Total Bytes Counter (#169)
* zeroization and correct value fetching
* Update execution_data_collector.go
2024-10-25 22:52:02 +02:00
Arijit Dutta
4111193835 Prover/Hash Key Consistency (#159)
* added constraints
* added the constraints in the sandwitch check
2024-10-25 22:51:41 +02:00
Arya Tabaie
ce964fc0cb Decompressor Library (#229)
* chore bring over changes from other branch

* chore: blocks as byte arrays not lists; tx.S <- 1

* build: update compressor lib release script by jpnovais

* docs and go generate

---------

Co-authored-by: Arya Tabaie <15056835+Tabaie@users.noreply.github.com>
2024-10-22 14:32:14 -05:00