Skip to content

Conversation

siq1
Copy link
Collaborator

@siq1 siq1 commented Nov 18, 2024

No description provided.

siq1 and others added 4 commits March 3, 2025 14:29
* add tests, but it fails now

* incorrect witness should fail now

* rename tests

---------

Co-authored-by: siq1 <siqi@polyhedra.network>
* add .cargo/config.toml (#104)

* add some clippy rules (#106)

* add some clippy rules

* modify comma

* modify

* fix wildcard_imports

* remove unused

* remove unused_parens

* add efc missing

* test condition

* m31_utils conditional import

* fix test import

* remove example for keccak serve

* Fix to_binary in m31_utils and example (#97)

* fix to_binary m31_utils and the inappropriate example

* use random for commit (#107)

Co-authored-by: siq1 <siqi@polyhedra.network>

* allow 0 or >=2 arguments for ToBinary (#108)

Co-authored-by: siq1 <siqi@polyhedra.network>

* fix a bug in expand_msg_xmd, pass hash_to_curve test

---------

Co-authored-by: hczphn <144504143+hczphn@users.noreply.github.com>
Co-authored-by: hczphn <huancheng@polyhedra.network>

* std circuit for bls pairing check  (#95)

* add curve assertoncurve in point module

* wip: StdCircuit

* add PairingParams&Debug

* random assignment

* add random point test, debug_eval pass

* clean up

* fix clippy

* fix test clippy

* remove common mod

* refactor circuit_test_helper_with_hint handling hint circuit

* fix mod issue

* use ark-ec 0.5.0

---------

Signed-off-by: DreamWuGit <wwuwwei@126.com>

* ci skip random pairing test (#112)

* add new api

* update expander

* api change

* combine rangeproof api (#118)

* bls12381: assert on curve for G2 extension field point (#113)

* add assert_is_on_twist

* multi mehtods for g2

* pairing with g1

* remove commented code

* rename:remove g2_ prefix

* change interface

* add back expander gkr, expect test fail

* Make logup hints generic type (#119)

* make logup hints generic

* remove unused import

* fix poseidon flatten, assert copy (#121)

* merge prover_setup and verifier_setup

* circuit serde (#115)

* wip

* wip

* fix serde changes

* clean up

* clean up

* Update Cargo.lock

* cargo lock

* update cargo lock

* Update Cargo.lock

* clean up

* clean up

* update cargo toml

* rename fr to bn254

* update ci: test in debug mode

* revert back to BN254Fr

* clippy

---------

Co-authored-by: siq1 <siqi@polyhedra.network>

* feat: add ability to return circuit output (#123)

* add new trait method for setting outputs on the builder

* add set_output to builder

* add new fn to build with internal outputs

* add output specific equivalent functions

* add run with outputs

* output take a vec of usize

* more updates

* output supremacy achieved

* extend into output rather than overriding

* remove log package

* support simd and remove duplication

---------

Co-authored-by: siq1 <siqi@polyhedra.network>

* adapt new Expander and fix bugs

* add back expander gkr

* wip

* v1, still problematic

* correctness done.

* clean up

* clean up

* clean up

* minor fix

---------

Signed-off-by: DreamWuGit <wwuwwei@126.com>
Co-authored-by: siq1 <166227013+siq1@users.noreply.github.com>
Co-authored-by: DreamWuGit <wwuwwei@126.com>
Co-authored-by: hczphn <144504143+hczphn@users.noreply.github.com>
Co-authored-by: hczphn <huancheng@polyhedra.network>
Co-authored-by: siq1 <siqi@polyhedra.network>
Co-authored-by: zhenfei <zhenfei.zhang@hotmail.com>
Co-authored-by: Wisdom Ogwu <40731160+iammadab@users.noreply.github.com>
@siq1 siq1 changed the base branch from dev to master April 1, 2025 03:29
siq1 and others added 17 commits April 9, 2025 10:39
* fix zkcuda compile time

* clippy

* fix conflict maybe

---------

Signed-off-by: siq1 <166227013+siq1@users.noreply.github.com>
* wip

* wip

* wip

* wip

* mostly working

* minor change

* switch back to slice in interface

* fmt

* remove uncessary clippy note

* fix after merge

* clean up
* add .cargo/config.toml (#104)

* add some clippy rules (#106)

* add some clippy rules

* modify comma

* modify

* fix wildcard_imports

* remove unused

* remove unused_parens

* add efc missing

* test condition

* m31_utils conditional import

* fix test import

* remove example for keccak serve

* Fix to_binary in m31_utils and example (#97)

* fix to_binary m31_utils and the inappropriate example

* use random for commit (#107)

Co-authored-by: siq1 <siqi@polyhedra.network>

* allow 0 or >=2 arguments for ToBinary (#108)

Co-authored-by: siq1 <siqi@polyhedra.network>

* fix a bug in expand_msg_xmd, pass hash_to_curve test

---------

Co-authored-by: hczphn <144504143+hczphn@users.noreply.github.com>
Co-authored-by: hczphn <huancheng@polyhedra.network>

* std circuit for bls pairing check  (#95)

* add curve assertoncurve in point module

* wip: StdCircuit

* add PairingParams&Debug

* random assignment

* add random point test, debug_eval pass

* clean up

* fix clippy

* fix test clippy

* remove common mod

* refactor circuit_test_helper_with_hint handling hint circuit

* fix mod issue

* use ark-ec 0.5.0

---------

Signed-off-by: DreamWuGit <wwuwwei@126.com>

* ci skip random pairing test (#112)

* add new api

* update expander

* combine rangeproof api (#118)

* bls12381: assert on curve for G2 extension field point (#113)

* add assert_is_on_twist

* multi mehtods for g2

* pairing with g1

* remove commented code

* rename:remove g2_ prefix

* Make logup hints generic type (#119)

* make logup hints generic

* remove unused import

* fix poseidon flatten, assert copy (#121)

* circuit serde (#115)

* wip

* wip

* fix serde changes

* clean up

* clean up

* Update Cargo.lock

* cargo lock

* update cargo lock

* Update Cargo.lock

* clean up

* clean up

* update cargo toml

* rename fr to bn254

* update ci: test in debug mode

* revert back to BN254Fr

* clippy

---------

Co-authored-by: siq1 <siqi@polyhedra.network>

* feat: add ability to return circuit output (#123)

* add new trait method for setting outputs on the builder

* add set_output to builder

* add new fn to build with internal outputs

* add output specific equivalent functions

* add run with outputs

* output take a vec of usize

* more updates

* output supremacy achieved

* extend into output rather than overriding

* remove log package

* support simd and remove duplication

---------

Co-authored-by: siq1 <siqi@polyhedra.network>

* impl goldilocks field (#126)

* wip

* update cargo lock

* Update Cargo.lock

* Update example_call_expander.rs

* Update Cargo.lock

* Update Cargo.lock

* Update Cargo.lock

* Update Cargo.lock

* update cargo toml

* sync up with Expander (#129)

* update expander and add goldilocks test (#134)

* update expander and add goldilocks test

* change import path

* disable pairing test by default (#136)

* goldilocks lookup test (#130)

* goldilocks lookup test

* fix lint

* correct key

* Sub circuit macro (#124)

* wip

* mostly working now

* add test

* clean up

* fmt

* RSA circuit (#52)

* wip

* get the multiplication correct

* addition circuit

* refactoring

* wip

* wip

* finished addition

* add bit decomposition

* finished a buggy addition

* fix bugs in u2048 add

* accumulation

* mul without mod reduction

* integrate mul

* finished multiplication

* fix bug in mul

* add serdes for BigUInt <> RSAElement

* almost there

* now stucked

* clean up

* implement debug builder

* fmt

* now tests passes

* clean up

* fix clippy

* clean up

* replace value_of with display

* fmt and readability

* minor

* move u120 and u2048 to std

* more clean up

* add sha2 placeholder

* add sha2 circuit --buggy

* wip

* remove sha2 since we already have other impls

* change directory structure to latest ECC

* clippy

---------

Co-authored-by: siq1 <siqi@polyhedra.network>

* Zz/refactor configs (#131)

* wip

* wip

* fix

* builds

* everything works except for goldilocks

* goldilocks also works now

* update cargo toml

* parallelized partially done.

* two exec files

* Builtin to binary (#139)

* implement builtin to binary

* add constraint and test

* change all exist uses of to_binary_hint to builtin

* clippy

* add from_binary

* fix clippy

* Add an intepret loader to load compiled circuits. (#103)

* a preliminary m31 circuit loader

* a preliminary m31 circuit loader

* port sha256 to compiled

* simplify

* ???

* it work fine...

* another 4.5%

* faster?

* hoist loader to the expander compiler

* keep both and hoist loader infra

* compiled keccak works

* sha256 is 1e-4 better :-(

* ?

* 36510520

* manual rebase

* wip...

* fix the compatibility

* ..

* roll back test cases

* format my loader

* fix clippy on my loader

* fix clippy on my loader

* use builtin to_binary and from_binary

---------

Co-authored-by: siq1 <siqi@polyhedra.network>

* almost there

* fix some errors

* update

* update (#142)

* impl babybear (#138)

* wip

* wip

* fix

* builds

* everything works except for goldilocks

* goldilocks also works now

* wip

* finished

* update cargo lock

* update cargo lock

* Update Cargo.lock

* fix clippy

* add logup test &fix overflow issue (#141)

* test for overflow

* use lower name

* fix overflow bug by using u128

* fix overflow bug by using u128

* fix lint

* add 49 bits test

* fix 49 bits panic

* remove print

* remove unused comment

---------

Co-authored-by: hczphn <huancheng@polyhedra.network>
Co-authored-by: siq1 <siqi@polyhedra.network>

* parallalized caller done

* fmt

* clippy auto fix

* callee commit done; prove wip

* use poseidon seed in expander (#145)

* use poseidon seed in expander

* update cargo toml lock

* update sha256 (support batch sha256)

* fmt, clippy

* remove old to_binary

* remove efc

* apply changes from #146

* callee prove done

* clippy fix

* wip tests&ci

* some debug

* wip

* remove tmp files

* naming

* root-only write in callee behavior

* debug done

* clippy

* fix bugs of merging

* clippy auto fix

* fix some problems in test

* fmt

* allow static mut refs

* more tests, expecting failure

* command line

* caller

* fix a problem in single core, caused by incorrect fix after merge

* oversubscription in mpi

* fix argument

* tmp fix: set enough space for commitment

* tmp disable some fields

* bug fix; add back tests for all fields

* remove some println

* timer

* add the profile features to cargo toml

---------

Signed-off-by: DreamWuGit <wwuwwei@126.com>
Co-authored-by: siq1 <166227013+siq1@users.noreply.github.com>
Co-authored-by: DreamWuGit <wwuwwei@126.com>
Co-authored-by: hczphn <144504143+hczphn@users.noreply.github.com>
Co-authored-by: hczphn <huancheng@polyhedra.network>
Co-authored-by: siq1 <siqi@polyhedra.network>
Co-authored-by: zhenfei <zhenfei.zhang@hotmail.com>
Co-authored-by: Wisdom Ogwu <40731160+iammadab@users.noreply.github.com>
Co-authored-by: Jian Weng <jian.weng465@gmail.com>
* parallelized partially done.

* two exec files

* almost there

* fix some errors

* update

* parallalized caller done

* fmt

* clippy auto fix

* callee commit done; prove wip

* callee prove done

* clippy fix

* wip tests&ci

* some debug

* wip

* remove tmp files

* naming

* root-only write in callee behavior

* debug done

* clippy

* fix bugs of merging

* clippy auto fix

* fix some problems in test

* fmt

* allow static mut refs

* more tests, expecting failure

* command line

* caller

* fix a problem in single core, caused by incorrect fix after merge

* oversubscription in mpi

* fix argument

* tmp fix: set enough space for commitment

* tmp disable some fields

* bug fix; add back tests for all fields

* remove some println

* timer

* tmp

* simple bench added

* logistics

* refactor

* clippy auto fix

* some preparations in expander_prove & expander_commit

* ready for test

* update to latest expander & temporarily switch to an custom branch

* debug done.

* remove some unnecessary ptr copying

* wip

* read necessary input vals only

* minor: ref multilinear poly

* minimize IO & share circuit memory

* add a timer

* move temporary files to /tmp

* fix a bug in mpi overscribe

* change default config in bench

* kzg as pcs

* fix after merge

---------

Co-authored-by: siq1 <siqi@polyhedra.network>
@siq1 siq1 requested review from zhenfeizhang and zhiyong1997 and removed request for zhenfeizhang May 16, 2025 02:59
@siq1 siq1 marked this pull request as ready for review May 16, 2025 02:59
*.witness

# mpi generated
Copy link
Collaborator

@zhiyong1997 zhiyong1997 May 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These generated files are now put into the \tmp folder. I think we can safely remove these (the mpi generated section).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove these lines in your new PR.

@siq1 siq1 merged commit eaa074a into master May 19, 2025
40 of 53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants