178 Commits

Author SHA1 Message Date
Arya Tabaie
356fb9a70f Prover: bump go-ethereum version (#3855)
Co-authored-by: Arya Tabaie <15056835+Tabaie@users.noreply.github.com>
2024-08-30 04:55:14 +02:00
AlexandreBelling
72d0006805 Prover: fix prover test CI (#3841)
* feat(statemanager): adds a generic interface for traces

* feat(shomei): checks the ordering of the traces shomei

* feat(shomei): check the ordering of the account segments

* chores(shomei): adds the type of account segment in the error trace

* style(shomei): remove systematic error log

* fix(shomei): sort the state-access to match shomei's expectations

* fix(mock): EOA has codeHash equal to emptyStorageHash instead of emptyCodeHash

* fix(ringsis): fix the failing CI tests for MiMC

* fix(serialization): fix the CI for the serialization test

* fix(shomei): fix read zero shomei

* fix(shomei): rename test to TestStateSummaryReadNonZeroShomei

* fix reuse of the same circuit

---------

Co-authored-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
2024-08-27 15:14:04 -05:00
Arya Tabaie
fbc18b26ad Fix/pi aggregationpi (#3836)
* fix size-0 edge cases
* feat configurable slack
* feat divide aggregation PI in two

---------

Co-authored-by: Arya Tabaie <15056835+Tabaie@users.noreply.github.com>
2024-08-26 17:56:02 +02:00
Arya Tabaie
ecead0d8ec fix gkrmimc <> test engine: bump gnark version (#3844)
* bump gnark version; no test_vector_utils

* chore: run go mod tidy

---------

Co-authored-by: Arya Tabaie <15056835+Tabaie@users.noreply.github.com>
Co-authored-by: Ivo Kubjas <ivo.kubjas@consensys.net>
2024-08-26 09:43:40 +02:00
AlexandreBelling
914b2f7630 Fix: Prover keccak/base-conversion wrong loop boundary check in lookups.go (#3838)
* Fix: Prover keccak/base-conversion wrong loop boundary check in lookups.go
* fix nextPowerOfTwo panic msg

---------

Signed-off-by: AlexandreBelling <alexandrebelling8@gmail.com>
Co-authored-by: Arya Tabaie <15056835+Tabaie@users.noreply.github.com>
2024-08-23 21:15:35 +02:00
Bogdan Ursu
b4b9674e0f Prover/execution data collector pre audit bug fixes (#3839)
* bug fix for total no of transactions
* two typos in comments
* lookup query to help with the security justification
2024-08-23 10:46:47 +02:00
Arya Tabaie
7629c25e09 Fix G115 staticcheck fails on main (#3820)
* fix nosec g115
* fix gofmt
* fix all staticcheck errors
* delegate more range checking to util funcs

---------

Co-authored-by: Arya Tabaie <15056835+Tabaie@users.noreply.github.com>
2024-08-22 14:05:48 +02:00
gusiri
68a7f6211e Constraints: remove GAS and OOB (#3830)
* remove GAS and OOB

* v0.4.0-rc1 without GAS and OOB
2024-08-21 18:03:26 +02:00
AlexandreBelling
cffb0318b6 Prover: GKR without option (#3831)
* feat(gkrmimr): bump gnark to a version that does not need to override the hints

* chores(gnark): point to the master branch for gnark's dependency
2024-08-21 11:02:47 -05:00
AlexandreBelling
950185ec90 Prover deactivate the ECADD module (#3828) 2024-08-21 13:05:16 +02:00
gusiri
98f5ba654c Corset and constraints: bump to beta v0.4.0-rc1 (#3818) 2024-08-20 22:27:26 +02:00
AlexandreBelling
d261807d61 Prover/beta v1 integration (#3813)
* disconnect the hub from the actual arithmetization
* adds the missing columns from the arithmetization
* fix invalid bound constraint for ecdsa
* adds the settings for all the modules
* deduplicating the columns names between sha2.packing and keccak.packing
* adjust the number of inputs for ecadd and ecmul
* sanity-checks against creating giant columns and giant range-checks
* more informative message about failing to split a global constraint
* fixing a mistake in the multi-limb cmp
* splitter: adding support for periodic sample with larger period
* ecpair: adjust the number of G2 check per circuit
* fix: generate missing twiddles for specific sis instances
* optime the FromAccessor verifier col to make it lighter
* fix: make all fields of ConstCol public
* serialization: add checks to panic when entering a private field
* factorization: remove false edge-case
* added logs for the artefact writing
* lookup: fix ensuring that the zCatalog are processed in deterministic order
* corset.go: remove deadcode
* artefacts: fix the file existence check in wizard.Artefact
* codehash: fix state-manager assignment code hash
* adds sha2 circuit
* ecdsa: fix a few bugs in the assignment part
* implements the tx-signature getter
* config: fix maximal value for the log level
* remove-me: making debugging simpler
* fixup + add some more informations
* batch-interpolate: fix the batch interpolation algorithm
* add more logs in the vortex prover
* fixup: remove the test acceleration
* vector builder: more friendly-message repush last on top of an empty builder
* public input: set the name in the settings automatically
* sha2: address the case where sha2 is never called
* keccak: remove trailing printf
* fix: sha2 failing test

* lookup: fix error message on lookup prover

* const-col: simplify the return of GetColAssignmentAt

* lane: address case where sha2 is never called

* mimccodehash: address the case where the codehash is empty

* multi-limbs: fix incorrect range query

* storage-peek: adjust the storage key decomposition to use less limbs

* fixup: remove trailing printf

* fixup: (from accessors) fix invalid getterAt

* more informative message for the projection queries

* log (dummy verifier): add a log when a query fails

* fix(nbZeroes): address the case where the number of inputs is zero

* fix(sha2): address the case where sha2 is not called

* fix(state-summary): address the fact that read|readzero follow a different pattern of account traces

* fix(state-summary): change the ordering in the state-summary

* fix(mimcCodeHash): reverse the direction of the lookup

* chores(inclusion): make the error more comprehensive by listing all the missing rows

* feat(state-manager): adds constraints for ensuring writes happen after reads

* feat(compressor): revert to the old way of hashing

* fix: comment out the checks that are pertaining to assessed issues in the arithmetization

* chores(projection): sends more insightful logs in the projection query

* style(ecdsa): remove nbTxs from assignTxSignature

* fix(vortex): adds a missing column ignoral

* adding new SIS parameters to the test

* feat(vortex): change the default SIS parameters

* chores(fs): skip the fiat-shamir update when running in dummy.Compile

* fix(vortex): bug when handling shadow columns

* fix(gnark-interpolation): better handling of constant terms

* fix(public-input): fix wrong query addressing

* fix(execution): change the structure of the circuit builder

* fixup

* feat(setup): change the ordering of the circuit generation

* fix(execution): allocate explicitly the L2 message hashes

* fixup

* fixup: remove debugging line

* fix(s3): change the line in the makefile to use include/exclude

* fix(circuit): fix incorrect assignment function

* fix(execution): correct the FinalBlockNumber assignment

* fix(execution): adjust the hashing of the L2 message hashes

* fix the assignment of modexp

* rm gitignore
2024-08-20 22:07:36 +02:00
Azam Soleimanian
28da4b6823 adding the missing constraints (#3797)
* adding the missing constraints
* minor
* cleaning the assignments
2024-08-14 17:54:15 +02:00
AlexandreBelling
819734563a Prover: integrate the public inputs (#3793)
* feat: Add the wizard to the zkevm instantiation
* make the l2BridgeAddress part of the witness
* add L2Message in the extractor
* update the backend so that it works with the new zkevm api
* compute the functional inputs
* update rand
* solves a cyclic dependency issue by moving some code of blob decompression into utils
* arrange the way the func inputs are computed from the crafting
* integrate the changes with the aggregation package
* fix invalid go:generate statement
* fixup: invalid import
* update golangci.yml to relax the linting rules (were breaking the CI)
2024-08-14 15:55:13 +02:00
Arya Tabaie
c0568080a1 Prover: implements the aggregation circuit for beta v1 (#3780)
---------

Signed-off-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
Co-authored-by: Arya Tabaie <15056835+Tabaie@users.noreply.github.com>
Co-authored-by: AlexandreBelling <alexandrebelling8@gmail.com>
2024-08-14 14:24:08 +02:00
Azam Soleimanian
2fba065021 txsignature-uses-actual-number-of-ecrecover (#3772)
* txsignature-uses-actual-number-of-ecrecover
* use the actual number
2024-08-13 14:59:02 +02:00
Azam Soleimanian
392e8ae52f Prover: adding doc and cleaning packing module (#3785) 2024-08-13 13:44:35 +02:00
Bogdan Ursu
36c46fdf03 Prover: integrate the public input API (#3777)
* Update rolling_selector.go
* ChainID, unaligned for now
* refactor
* adding local openings
* fetch ChainID's NBytes and refactoring
* NBytesChainID
* refactor: grouping csv assignment
* total number of bytes
* first and last block IDs
* style: adjust the API for the public inputs

---------

Co-authored-by: AlexandreBelling <alexandrebelling8@gmail.com>
2024-08-12 10:30:51 +02:00
Azam Soleimanian
fac125828b Prover: add the missing constraints to the padding module (#3779)
* added missing constraints

* adding docs
2024-08-08 17:47:03 +02:00
AlexandreBelling
3b53443a2d Prover: Integrate all except the public inputs (#3769)
* rename package ecrecover to ecdsa
* move everything into ecdsa folder
* refactor the api of the antichamber module
* adjust the arithmetization interface
* rename the ecdsa API to EcdsaZkEvm
* adjust the API of ecadd/ecmul
* simplify the API for keccak
* simplify the API for modexp
* unexport the sha2 blocks
* adjust the ecpairing interface
* NewStateManager returns a pointer
* perfect the zk-evm API
* remove "features" from the config
* remove unused parameter in ecadd/ecmul.Assign
* implements the assignment part of the main zkevm
* add missing settings assignment to the keccak_zkevm
* remove outdated comment in keccak_single_provider
* doc: fixing a wrong comment for keccak
* adds sha2 as part of the zkevm
* skip flacky test in e2e_test for pi-interconnection
* fix bug in lookup compiler when no lookup are parts of the protocol
* fix a handful of bugs in plonk in wizard
* skip second flacky test in the pi-interconnection
* fix bug in ecpair
* remove features from the e2e testing config
2024-08-08 01:52:34 +02:00
AlexandreBelling
a0c3d3d52c Prover: Zeroize empty Plonk witnesses for Plonk in Wizard (#3766)
* add supports for cancellable plonk
* optimize the range-checker assignment
* prover: add verifier checks for the activators
* fixup: set the check to the right column
* remove trailing printf's
2024-08-07 11:47:07 +02:00
Azam Soleimanian
f1fc8bcb7d Prover: adding the missing constraints for txSignature (#3770) 2024-08-07 09:33:10 +02:00
Bogdan Ursu
b92a86bc70 Prover/ExecutionDataCollector (#3768)
* Update MIMC_hasher.go
* hashNum and Ct columns
* converse transitions
* clean: deimport the importation module and do a bit of renaming
* remove execdatahashing

---------

Co-authored-by: AlexandreBelling <alexandrebelling8@gmail.com>
2024-08-06 15:28:45 +02:00
Azam Soleimanian
8fb5c34cef Prover: complete the implementation of the keccak module (#3764)
* reorganize the structure of the keccak module
* rewrite the interface between keccak and the interconnection module
* rewrite the interface between keccak and the ecdsa module

---------

Co-authored-by: AlexandreBelling <alexandrebelling8@gmail.com>
2024-08-06 12:12:36 +02:00
Ivo Kubjas
84b6f8921c feat: add ECPAIR precompile integration (#3759)
* feat: add ECPAIR precompile integration

* chore: go.mod update

* chore: remove debug print

* fix: arithmetization reverse order G2 parts
2024-08-02 21:48:27 +02:00
m4sterbunny
5a8e26bf87 doc: fix typos in comments (#3754)
* docs: Starts fixing zk-EVM to zkEVM

* docs: fixes zk-EVM and light proof

* Update prover/README.md

Signed-off-by: Julien Marchand <julien-marchand@users.noreply.github.com>

---------

Signed-off-by: Julien Marchand <julien-marchand@users.noreply.github.com>
Co-authored-by: Julien Marchand <julien-marchand@users.noreply.github.com>
2024-08-01 16:44:34 +02:00
Azam Soleimanian
6c922bf156 revised interconnection (#3753)
* revised interconnection

* cleaning
2024-08-01 16:31:38 +02:00
Julien Marchand
a001342170 chore: Initial commit
Co-authored-by: Franklin Delehelle <franklin.delehelle@odena.eu>
Co-authored-by: Alexandre Belling <alexandrebelling8@gmail.com>
Co-authored-by: Pedro Novais <jpvnovais@gmail.com>
Co-authored-by: Roman Vaseev <4833306+Filter94@users.noreply.github.com>
Co-authored-by: Bradley Bown <bradbown@googlemail.com>
Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
Co-authored-by: Nikolai Golub <nikolai.golub@consensys.net>
Co-authored-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Co-authored-by: jonesho <81145364+jonesho@users.noreply.github.com>
Co-authored-by: Gaurav Ahuja <gauravahuja9@gmail.com>
Co-authored-by: Azam Soleimanian <49027816+Soleimani193@users.noreply.github.com>
Co-authored-by: Andrei A <andrei.alexandru@consensys.net>
Co-authored-by: Arijit Dutta <37040536+arijitdutta67@users.noreply.github.com>
Co-authored-by: Gautam Botrel <gautam.botrel@gmail.com>
Co-authored-by: Ivo Kubjas <ivo.kubjas@consensys.net>
Co-authored-by: gusiri <dreamerty@postech.ac.kr>
Co-authored-by: FlorianHuc <florian.huc@gmail.com>
Co-authored-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
Co-authored-by: Julink <julien.fontanel@consensys.net>
Co-authored-by: Bogdan Ursu <bogdanursuoffice@gmail.com>
Co-authored-by: Jakub Trąd <jakubtrad@gmail.com>
Co-authored-by: Alessandro Sforzin <alessandro.sforzin@consensys.net>
Co-authored-by: Olivier Bégassat <olivier.begassat.cours@gmail.com>
Co-authored-by: Steve Huang <97596526+stevehuangc7s@users.noreply.github.com>
Co-authored-by: bkolad <blazejkolad@gmail.com>
Co-authored-by: fadyabuhatoum1 <139905934+fadyabuhatoum1@users.noreply.github.com>
Co-authored-by: Blas Rodriguez Irizar <rodrigblas@gmail.com>
Co-authored-by: Eduardo Andrade <eduardofandrade@gmail.com>
Co-authored-by: Ivo Kubjas <tsimmm@gmail.com>
Co-authored-by: Ludcour <ludovic.courcelas@consensys.net>
Co-authored-by: m4sterbunny <harrie.bickle@consensys.net>
Co-authored-by: Alex Panayi <145478258+alexandrospanayi@users.noreply.github.com>
Co-authored-by: Diana Borbe - ConsenSys <diana.borbe@consensys.net>
Co-authored-by: ThomasPiellard <thomas.piellard@gmail.com>
2024-07-31 18:17:20 +02:00