Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keccakf Precompiled #220

Merged
merged 63 commits into from
Feb 17, 2025
Merged

Keccakf Precompiled #220

merged 63 commits into from
Feb 17, 2025

Conversation

hecmas
Copy link
Contributor

@hecmas hecmas commented Jan 31, 2025

No description provided.

xavi-pinsach and others added 30 commits January 20, 2025 17:42

Verified

This commit was signed with the committer’s verified signature.
xavi-pinsach Xavier Pinsach

Verified

This commit was signed with the committer’s verified signature.
xavi-pinsach Xavier Pinsach

Verified

This commit was signed with the committer’s verified signature.
xavi-pinsach Xavier Pinsach

Verified

This commit was signed with the committer’s verified signature.
xavi-pinsach Xavier Pinsach

Verified

This commit was signed with the committer’s verified signature.
xavi-pinsach Xavier Pinsach

Verified

This commit was signed with the committer’s verified signature.
xavi-pinsach Xavier Pinsach

Partially verified

This commit is signed with the committer’s verified signature.
xavi-pinsach’s contribution has been verified via GPG key.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.

Partially verified

This commit is signed with the committer’s verified signature.
xavi-pinsach’s contribution has been verified via GPG key.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.

Partially verified

This commit is signed with the committer’s verified signature.
xavi-pinsach’s contribution has been verified via GPG key.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.

Verified

This commit was signed with the committer’s verified signature.
xavi-pinsach Xavier Pinsach

Partially verified

This commit is signed with the committer’s verified signature.
xavi-pinsach’s contribution has been verified via GPG key.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
WIP

Partially verified

This commit is signed with the committer’s verified signature.
xavi-pinsach’s contribution has been verified via GPG key.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.

Verified

This commit was signed with the committer’s verified signature.
xavi-pinsach Xavier Pinsach

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
* update mem helpers

* update keccakf.pil with memory function calls

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol

Verified

This commit was signed with the committer’s verified signature.
RogerTaule Roger Taulé Buxadera

Verified

This commit was signed with the committer’s verified signature.
RogerTaule Roger Taulé Buxadera

Verified

This commit was signed with the committer’s verified signature.
RogerTaule Roger Taulé Buxadera

Verified

This commit was signed with the committer’s verified signature.
RogerTaule Roger Taulé Buxadera

Verified

This commit was signed with the committer’s verified signature.
RogerTaule Roger Taulé Buxadera

Verified

This commit was signed with the committer’s verified signature.
RogerTaule Roger Taulé Buxadera
hecmas and others added 9 commits February 11, 2025 16:02

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol

Verified

This commit was signed with the committer’s verified signature.
xavi-pinsach Xavier Pinsach

Verified

This commit was signed with the committer’s verified signature.
xavi-pinsach Xavier Pinsach

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol
@hecmas hecmas changed the base branch from develop to pre-develop-0.4.0 February 13, 2025 09:00
xavi-pinsach and others added 2 commits February 13, 2025 15:23

Verified

This commit was signed with the committer’s verified signature.
xavi-pinsach Xavier Pinsach

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol
@hecmas hecmas marked this pull request as ready for review February 13, 2025 17:47

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol
@hecmas hecmas requested review from xavi-pinsach, fractasy and zkronos73 and removed request for xavi-pinsach February 17, 2025 15:20
@hecmas hecmas self-assigned this Feb 17, 2025
hecmas and others added 5 commits February 17, 2025 15:43

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol

Verified

This commit was signed with the committer’s verified signature.
xavi-pinsach Xavier Pinsach

Verified

This commit was signed with the committer’s verified signature.
xavi-pinsach Xavier Pinsach

Verified

This commit was signed with the committer’s verified signature.
hecmas Héctor Masip Ardevol

Verified

This commit was signed with the committer’s verified signature.
RogerTaule Roger Taulé Buxadera
@RogerTaule RogerTaule merged commit 9253f20 into pre-develop-0.4.0 Feb 17, 2025
5 checks passed
xavi-pinsach added a commit that referenced this pull request Feb 21, 2025

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
* fix bug with mem_align planner

* remove step and bus debug enable to add pubout

* fix some bugs on memory planners

* remove incorrect STEP_MEMORY_MAX_DIFF value used for testing

* some comments and small improvements

* a first optimization of memory counters

* optimize memory planner

* parallel sort on mem input

* Fix pubout calls to be executed after syscall, and read 16x8 bytes (#210)

* Fix pubout calls to be executed after syscall, and read 16x8 bytes

* fix some minor warnings

* fix typo on mem planner

* Fix/pub outs (#219)

* Publics working

* Changing to 32 publics of 64

* Cargo update

* add comments and cargo clippy

---------

Co-authored-by: Xavier Pinsach <[email protected]>

* Fixing couple memory edge cases (#221)

* fix some comments of PR

* fix typo

* update comments on pil

* fix minor build issues

* fix clippy warning

* Splitting execute in two parts (#213)

* Splitting execute in two parts

* Remove Option in rwlocks

* cargo clippy

* WIP debug mode

* First version debug mode

* cargo fmt

* Providing sctx to compute witness

* Cargo fmt

* Updating traces and cargo update

* Minor change

* Cargo lock update

* Cargo fmt

* Fixing rebase

---------

Co-authored-by: Xavier Pinsach <[email protected]>

* WIP registers inside main sm

* WIP fix compilation bugs

* WIP registers on main

* Merge branch 'develop' into feature/regs-on-main-develop-0.3.0

* add feature max steps when executing minimal traces

* fix bug with storing value on register

* adding missing functions comments

* fix fmt

* fix mem align output (#228)

* fix fmt

* improve executor mod comment

* implementation of registers on main

* upgrade up to 20 registers

* update to 32 registers on main

* remove bus_id in fn measure as it's not necessary

* improve counters

* improve mem_module_instance

* add inline to measure

* counters and input generators improvements

* cargo fmt

* move busdevicemode to common

* move busdevicemode to common

* fix tables created only when exists inputs for this machine

* clean code, add some comments and eliminate duplicated mem helpers

* cargo clippy

* cargo fmt

* cargo fmt

* Simplifying rom-merkle

* add comments to main.pil

* Imp/cargo zisk (#235)

* refactor cargo-zisk to modularize

* add samples folder and content

* verify constraints working

* remove use warning

* Added cargo-zisk prove command. Refactor workspace dependencies

* add common.rs for cli reused structs

* Custom commits cache working

* Cargo clippy and fmt

---------

Co-authored-by: Xavier Pinsach <[email protected]>
Co-authored-by: agnusmor <[email protected]>

* Feature/std performance imp (#233)

* Removing STD SM and std proofman improvements

* fill binaries witness in parallel

* Improving distribution multiplicities

* Cargo fmt and clippy

* Build working fine

---------

Co-authored-by: Xavier Pinsach <[email protected]>

* Update cargo.lock

* Keccakf Precompiled (#220)

* added data-bus player

* cargo fmt & clippy

* cargo fmt & clippy

* fix cargo test

* remove test

* cargo fmt

* Starting to work on keccak precompiled

* Keccakf table working

* Making the PIL work and updating the traces

* prepare opcode

* Working in the executor

* WIP

* modify PrecompileCall API

* Adding a function for fixed columns

* Making it compile

* minor fixes

* Update to the keccakf functionality

* Keccakf fixed generator fully working

* Minor fixes corrected

* removing the generated fixed columns

* Parametrized keccakf_table an set the best parameters for keccakf

* Finding the keccakf optimal

* Feature/keccak precomp mem helpers (#216)

* update mem helpers

* update keccakf.pil with memory function calls

* Updating keccakf pil

* Splitting execute in two parts

* Remove Option in rwlocks

* cargo clippy

* WIP debug mode

* First version debug mode

* cargo fmt

* Emulate Keccakf with mem reads generate/consume (#215)

* fix regular counter (#209)

* Fixed use rust stable toolchain in GHA

* Cleanup rust toolchain in GHA

* Fix Clippy format errors

* fix typo

* Added scripts to update Rust version in Zisk-Rust repo (#199)

* Added scripts to update Rust version in Zisk-Rust repo

* Change branch to "zisk" when building toolchain

* Fix pr GHA

* Fix Clippy format errors

* Emulate Keccakf with mem reads generate/consume

* Use ExtOperationData in all state machines

* Fix some clippy errors

* Keccakf executor done without mem

* updating the book

* Fix opc_keccak

* Minor fixes

* Fixing bug in traces

* fix regular counter for keccak

* fix regular process_data to adapt new try_info fn from ExtOperationData

* architecture working

* Fixing the main lookup

* keep debugging

* minor cahnges

* minor cahnges

---------

Co-authored-by: Xavier Pinsach <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: Héctor Masip <[email protected]>

* Providing sctx to compute witness

* Cargo fmt

* keecakf constraint passing

* update

* merge develop 0.3.0

* integrating

* merging new arch

* Adapting the connections and the script to 60 bits

* Working in the new version

* Subtle bug found and fixed

* Fixing minor bugs

* Keccakf working

* cleaning the code

* Adding important constraints

* keccakf working

* fixing more bugs everywhere

* fix wrong bus connection

* simplifying keccakf counter and input collector

* cargo fix

* Keccakf finally working!

* fix add tables only when needed

* Keccakf fully working

* bug fixed

* finishing the keccakf and fixing the verify all tool

* mem duplicate

* remove mutex

* minor fix

* Cargo fmt

---------

Co-authored-by: Xavier Pinsach <[email protected]>
Co-authored-by: zkronos73 <[email protected]>
Co-authored-by: RogerTaule <[email protected]>
Co-authored-by: fractasy <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: agnusmor <[email protected]>

* remove dummy counter and organize common counters and planners (#237)

* improve code (#238)

* cargo clippy

* Feature table instance array (#239)

* Cargo update and fmt (#240)

* fix ra store on ecall

* Adding feature distributed to cli (#241)

* Adding feature distributed to cli

* Cargo.toml

* CI install openmpi

* Minor fixes

* Fix memory edge case multiple collectors

* Cargo fmt

* fix bug on memory planning

* cargo clippy - clean debug code

* Fix ziskemu and cargo-zisk CLI options  (#217)

* Fix display ziskemu options. Fix cargo-zisk flags. Fix show stats

* Rename cargo-zisk option metrics to log_metrics

* fix and comments main pil

* comment and clean mem_module_instance

* add comments on mem and main pil

* Delete riscv crate dependency with json (unneeded) (#245)

* cargo clippy

* Fix data bus (#247)

* Add 'verify' subcommand to cargo-zisk 'prove' command (#246)

* Added verify-stark cli command

* Cargo verify

* Replace short letter for --verify-proofs flag

* Remove cargo.lock

---------

Co-authored-by: RogerTaule <[email protected]>

* Pointing to develop (#248)

* Avoid clone an Arc on every row when filling main traces (#250)

* avoid clone an Arc on every row when filling main traces

* Update book documentation (#252)

* Update book documentation

* Update README

* Update README (#253)

---------

Co-authored-by: zkronos73 <[email protected]>
Co-authored-by: fractasy <[email protected]>
Co-authored-by: Roger Taulé Buxadera <[email protected]>
Co-authored-by: zkronos73 <[email protected]>
Co-authored-by: RogerTaule <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: Héctor Masip Ardevol <[email protected]>
Co-authored-by: agnusmor <[email protected]>
agnusmor added a commit that referenced this pull request Feb 21, 2025

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
* fix bug with mem_align planner

* remove step and bus debug enable to add pubout

* fix some bugs on memory planners

* remove incorrect STEP_MEMORY_MAX_DIFF value used for testing

* some comments and small improvements

* a first optimization of memory counters

* optimize memory planner

* parallel sort on mem input

* Fix pubout calls to be executed after syscall, and read 16x8 bytes (#210)

* Fix pubout calls to be executed after syscall, and read 16x8 bytes

* fix some minor warnings

* fix typo on mem planner

* Fix/pub outs (#219)

* Publics working

* Changing to 32 publics of 64

* Cargo update

* add comments and cargo clippy

---------

Co-authored-by: Xavier Pinsach <[email protected]>

* Fixing couple memory edge cases (#221)

* fix some comments of PR

* fix typo

* update comments on pil

* fix minor build issues

* fix clippy warning

* Splitting execute in two parts (#213)

* Splitting execute in two parts

* Remove Option in rwlocks

* cargo clippy

* WIP debug mode

* First version debug mode

* cargo fmt

* Providing sctx to compute witness

* Cargo fmt

* Updating traces and cargo update

* Minor change

* Cargo lock update

* Cargo fmt

* Fixing rebase

---------

Co-authored-by: Xavier Pinsach <[email protected]>

* WIP registers inside main sm

* WIP fix compilation bugs

* WIP registers on main

* Merge branch 'develop' into feature/regs-on-main-develop-0.3.0

* add feature max steps when executing minimal traces

* fix bug with storing value on register

* adding missing functions comments

* fix fmt

* fix mem align output (#228)

* fix fmt

* improve executor mod comment

* implementation of registers on main

* upgrade up to 20 registers

* update to 32 registers on main

* remove bus_id in fn measure as it's not necessary

* improve counters

* improve mem_module_instance

* add inline to measure

* counters and input generators improvements

* cargo fmt

* move busdevicemode to common

* move busdevicemode to common

* fix tables created only when exists inputs for this machine

* clean code, add some comments and eliminate duplicated mem helpers

* cargo clippy

* cargo fmt

* cargo fmt

* Simplifying rom-merkle

* add comments to main.pil

* Imp/cargo zisk (#235)

* refactor cargo-zisk to modularize

* add samples folder and content

* verify constraints working

* remove use warning

* Added cargo-zisk prove command. Refactor workspace dependencies

* add common.rs for cli reused structs

* Custom commits cache working

* Cargo clippy and fmt

---------

Co-authored-by: Xavier Pinsach <[email protected]>
Co-authored-by: agnusmor <[email protected]>

* Feature/std performance imp (#233)

* Removing STD SM and std proofman improvements

* fill binaries witness in parallel

* Improving distribution multiplicities

* Cargo fmt and clippy

* Build working fine

---------

Co-authored-by: Xavier Pinsach <[email protected]>

* Update cargo.lock

* Keccakf Precompiled (#220)

* added data-bus player

* cargo fmt & clippy

* cargo fmt & clippy

* fix cargo test

* remove test

* cargo fmt

* Starting to work on keccak precompiled

* Keccakf table working

* Making the PIL work and updating the traces

* prepare opcode

* Working in the executor

* WIP

* modify PrecompileCall API

* Adding a function for fixed columns

* Making it compile

* minor fixes

* Update to the keccakf functionality

* Keccakf fixed generator fully working

* Minor fixes corrected

* removing the generated fixed columns

* Parametrized keccakf_table an set the best parameters for keccakf

* Finding the keccakf optimal

* Feature/keccak precomp mem helpers (#216)

* update mem helpers

* update keccakf.pil with memory function calls

* Updating keccakf pil

* Splitting execute in two parts

* Remove Option in rwlocks

* cargo clippy

* WIP debug mode

* First version debug mode

* cargo fmt

* Emulate Keccakf with mem reads generate/consume (#215)

* fix regular counter (#209)

* Fixed use rust stable toolchain in GHA

* Cleanup rust toolchain in GHA

* Fix Clippy format errors

* fix typo

* Added scripts to update Rust version in Zisk-Rust repo (#199)

* Added scripts to update Rust version in Zisk-Rust repo

* Change branch to "zisk" when building toolchain

* Fix pr GHA

* Fix Clippy format errors

* Emulate Keccakf with mem reads generate/consume

* Use ExtOperationData in all state machines

* Fix some clippy errors

* Keccakf executor done without mem

* updating the book

* Fix opc_keccak

* Minor fixes

* Fixing bug in traces

* fix regular counter for keccak

* fix regular process_data to adapt new try_info fn from ExtOperationData

* architecture working

* Fixing the main lookup

* keep debugging

* minor cahnges

* minor cahnges

---------

Co-authored-by: Xavier Pinsach <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: Héctor Masip <[email protected]>

* Providing sctx to compute witness

* Cargo fmt

* keecakf constraint passing

* update

* merge develop 0.3.0

* integrating

* merging new arch

* Adapting the connections and the script to 60 bits

* Working in the new version

* Subtle bug found and fixed

* Fixing minor bugs

* Keccakf working

* cleaning the code

* Adding important constraints

* keccakf working

* fixing more bugs everywhere

* fix wrong bus connection

* simplifying keccakf counter and input collector

* cargo fix

* Keccakf finally working!

* fix add tables only when needed

* Keccakf fully working

* bug fixed

* finishing the keccakf and fixing the verify all tool

* mem duplicate

* remove mutex

* minor fix

* Cargo fmt

---------

Co-authored-by: Xavier Pinsach <[email protected]>
Co-authored-by: zkronos73 <[email protected]>
Co-authored-by: RogerTaule <[email protected]>
Co-authored-by: fractasy <[email protected]>
Co-authored-by: agnusmor <[email protected]>
Co-authored-by: agnusmor <[email protected]>

* remove dummy counter and organize common counters and planners (#237)

* improve code (#238)

* cargo clippy

* Feature table instance array (#239)

* Cargo update and fmt (#240)

* fix ra store on ecall

* Adding feature distributed to cli (#241)

* Adding feature distributed to cli

* Cargo.toml

* CI install openmpi

* Minor fixes

* Fix memory edge case multiple collectors

* Cargo fmt

* fix bug on memory planning

* cargo clippy - clean debug code

* Fix ziskemu and cargo-zisk CLI options  (#217)

* Fix display ziskemu options. Fix cargo-zisk flags. Fix show stats

* Rename cargo-zisk option metrics to log_metrics

* fix and comments main pil

* comment and clean mem_module_instance

* add comments on mem and main pil

* Delete riscv crate dependency with json (unneeded) (#245)

* cargo clippy

* Fix data bus (#247)

* Add 'verify' subcommand to cargo-zisk 'prove' command (#246)

* Added verify-stark cli command

* Cargo verify

* Replace short letter for --verify-proofs flag

* Remove cargo.lock

---------

Co-authored-by: RogerTaule <[email protected]>

* Pointing to develop (#248)

* Avoid clone an Arc on every row when filling main traces (#250)

* avoid clone an Arc on every row when filling main traces

* Update book documentation (#252)

* Update book documentation

* Update README

* Update README (#253)

* add mpi to action.yml

* Add documentation steps to install setup files

* fix extract file

* Update documentation steps to install verify keys files

* fix

---------

Co-authored-by: zkronos73 <[email protected]>
Co-authored-by: fractasy <[email protected]>
Co-authored-by: Roger Taulé Buxadera <[email protected]>
Co-authored-by: Xavier Pinsach <[email protected]>
Co-authored-by: zkronos73 <[email protected]>
Co-authored-by: RogerTaule <[email protected]>
Co-authored-by: Héctor Masip Ardevol <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants