29 Commits

Author SHA1 Message Date
AlexandreBelling
c21b6d3d97 chores(tmpl): adds the ^ in the solidity pragma of the mimc template (#1192) 2025-06-19 16:14:25 +08:00
Bogdan Ursu
729524cf98 bug(state-manager): fix issue with insertion filter missing in the in… (#1069)
* bug(state-manager): fix issue with insertion filter missing in the initial storage lookup

* fix mimc code template

---------

Co-authored-by: AlexandreBelling <alexandrebelling8@gmail.com>
2025-05-30 09:56:25 +02:00
AlexandreBelling
91f3865438 Prover: the controller skips waiting for the sub-process to yield on a SIGTERM in spot-instance mode (#1049)
* fix(controller): immediately exits when receiving the SIGTERM without waiting for the kill to complete

* feat(tmp-response): also remove the tmp response file in case it exists

* minor(execution): adds a comment explaining why we can safely close
2025-05-27 07:17:05 +02:00
AlexandreBelling
c70eb92cd3 feat(spot): adds spot-instance mode (#1031)
* feat(spot): adds early graceful exit mechanism to exit the process in time.

* minor(controller): explicit the fact that os.Rename cannot fail post execution.

---------

Signed-off-by: AlexandreBelling <alexandrebelling8@gmail.com>
2025-05-20 14:58:20 +02:00
Lakshminarayanan Nandakumar
04d79bbb6a added code 2 to retry (#1012)
* added code 2 to retry

* retry for full-large prover for retriable codes
2025-05-15 21:19:49 +02:00
The Dark Jester
5d5b56dadd [Chore] Bumping Hardhat and Solidity to latest (#995)
* bumping Hardhat and Solidity to latest

* bump coverage plugin

* add coverage var to command execute

* revert test

* update build script to use 0.8.28
2025-05-13 08:14:07 -07:00
Leo Jeong
bc96f16aea Prover(fix): setup execution-large (#844)
* fix execution large circuitID and add sanity-check for traces limits checksum between setup and config

* fix: add sync.once fullZkEvmSetup and fullZkEvmSetupLarge for setup

* fix: prover large cbor Unmarshal error "exceeded max number of elements"
- use default value (131072) x 1024 for MaxArrayElements and MaxMapPairs
2025-04-08 08:25:22 +02:00
David Pearce
bf71b6b5ca Prover: compatibility check between zkevmbin and lt trace file (#745)
* update `go-corset` to `v0.9.4`

* feat: add binfile / tracefile compatibility check

This adds a compatibility check between the zkevm.bin file and the lt
trace file.  The compatibility check extracts the constraints commit
used to generate the respective asset, and ensures a match.  If not, the
code panics with an error.  Likewise, if the metadata is missing then
code will panic with an error.

* support "relaxed mode"

This intention here is to enable the strong compatibility check to be
disabled.  It seems sensible to have an option to turn it off, and a
flag is added to the `bin/checker` to disable it.

* remove file-based constraints version check

* update to later version of `go-corset`

In order to allow embedded line count information (as requested
separately from this PR), go-corset now uses a structured form of
metadata.  This simply updates this PR to use the revised API.

* rename "RelaxedMode" => "IgnoreCompabitilityCheck"

This simply renames the "relaxed mode" to something more direct, namely
"IgnoreCompatiblityCheck" which does what it says on the tin.

* update `go-corset` to v1.0.0

* add IgnoreCompatibilityCheck option to prover config

* remove unnecessary variable

* Update compatibility check to fail early on incompatibility

* add log when IgnoreCompatibilityCheck is enabled

---------

Co-authored-by: gusiri <dreamerty@postech.ac.kr>
2025-03-07 08:45:54 +09:00
David Pearce
d716763ac0 feat: support go corset optimisation and metadata (#713)
This adds the option to run the checker in "bench" mode, and also adds support for passing a go-corset optimisation level via the bin/checker.  The purpose of this is to enable testing at different optimisation levels to see what effect this has.  Finally, it exposes the metadata stored in the zkevm.bin file, such that it can be used for cross-checking purposes.  For example, the metadata includes the git commit of the enclosing repository when it was built.

---------

Co-authored-by: AlexandreBelling <alexandrebelling8@gmail.com>
2025-02-26 12:49:41 +13:00
kyzooghost
aa64956c77 [Feat] L1 contracts bump to solidity 0.8.28 (#656)
* working hardhat compile

* bump solhint version

* bump hardhat version

* remove 0.8.26 refs

* remove solhint join discord cli message

* update upgrades-core dependency

* silence openzeppelin-upgrades error for test fixtures

* fix floating version for integrationtesttrue

* remove 0.8.26
2025-02-07 00:00:02 +11:00
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
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
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
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
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
Ivo Kubjas
c895052eb0 fix: target Solidity 0.8.26 (#75)
Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
Co-authored-by: The Dark Jester <thedarkjester@users.noreply.github.com>
2024-09-26 10:05:47 -07:00
Victorien Gauch
65f7000f99 chore(3704): Bump solidity version to 0.8.26 across the repository (#64)
* Bump solidity version to 0.8.26 across the repository

* Regenerated Verifiers

* bump solidity for other merged PRs

---------

Co-authored-by: thedarkjester <grant.southey@consensys.net>
Co-authored-by: The Dark Jester <thedarkjester@users.noreply.github.com>
2024-09-24 11:14:12 +02:00
AlexandreBelling
e63c730d6d Prover: switch the go import path to linea-monorepo (#20)
* switch the go import path to linea-monorepo
* address every occurence to zkevm-monorepo
2024-09-13 15:10:04 +02:00
AlexandreBelling
3f8c3751c1 Prover/corset integration (#3900)
* feat(corset): implements and test the constraint declaration
* feat: integrate all the changes in the wizard
* tmp(mod): points to the go-corset feature branch
* feat(corset) register interleaved columns
* chores(mod): uses latest go corset to include the optimizations
* disable the problematic linters
* ignore the arithmetization folder in the linting process
* adds zkevm.bin in the repo
2024-09-06 10:57:28 +02:00
Arya Tabaie
eb9564edae Fix/simplify pi integration (#3837)
* fix simplified public input embedding

* update integration test

* build bump go-ethereum version

* fix pi setup in integration test

* feat dummy pi circuit

* refactor move ToVariableSlice to utils

* test small "integration test" for aggr

* fix max = 0 edge case for NewRange

* truncate cvks (unnecessary)

* build update gnark dep

* refactor simplify aggregation backend logic
2024-09-05 08:36:54 -05: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
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
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
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
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