34 Commits

Author SHA1 Message Date
Kevin Jue
c01f530fe1
fix: Support range checking non aligned bitwidth values (#47)
* initial commit

* most of the code done

* made global poseidon chip

* changed decompSize and added some panics

* made all gl chip as pointers

* working code

* revert go.mod and go.sum

* cleanup and comments

* cleaned up range checker selection

* renamed gnarkRangeCheckSelector to gnarkRangeCheckerSelector

* addressed PR comment

* addressed overflow issue identified by Veridise

* added some comments

* fixed some comment typos

* restore change made from commit hash 85d20ce and 9617141
2024-01-04 13:56:13 -08:00
Kevin Jue
49511611b5 fix for V-SCT-VUL-031 2023-12-19 13:24:27 -08:00
Kevin Jue
40d71e9e29 fix for V-SCT-VUL-025 2023-12-19 11:07:36 -08:00
Kevin Jue
7c7a01a395 fix for V-SCT-VUL-024 2023-12-19 11:04:30 -08:00
Kevin Jue
ac49898dd1 fix for V-SCT-VUL-016 2023-12-18 18:02:01 -08:00
Kevin Jue
96171410b0 fix for V-SCT-VUL-015 2023-12-18 17:58:56 -08:00
Kevin Jue
5766879636 fix for V-SCT-VUL-00 and V-SCT-VUL-010 2023-12-18 17:09:06 -08:00
puma314
89b5a01e4b
feat: Plonk optimizations (#39)
* Fixed poseidion hash TOOD in fri/fri.go

* optimized goldilocks

* Another optimization

* Down to 16 million

* Finished TODOs
2023-10-13 14:00:54 -07:00
puma314
940c81b212
Significant refactor and all tests passing, as well as optimized range check for Goldilocks (#37) 2023-10-11 18:02:46 -07:00
puma314
0c677ddd0d
Revert "Range check optimizations" 2023-10-11 17:39:52 -07:00
Uma Roy
4841d382d7 Modified another name 2023-10-11 17:33:09 -07:00
Uma Roy
5d53737841 Moved to variables 2023-10-11 12:01:26 -07:00
Uma Roy
3b8611c6ac Rename back 2023-10-11 11:37:45 -07:00
Uma Roy
1c0235b35a Renamed symbol a bunch in goldilocks, goldilocks tests pass 2023-10-10 22:32:54 -07:00
Uma Roy
07cf7bd857 Upgraded dependencies 2023-10-10 22:15:01 -07:00
John Guibas
b670530e7f
Use optimized goldilocks in codebase (#26)
* gl

* stage 1 optimizations

* working optimized poseidon

* Fix posedion tests

* in progress gate type refactor

* working gates

* working e2e

* hm'

* hm2

* debug saga continues

* more debugging cry

* more debug

* it finally works

* optimizations

* more optimizations

* new changes

* more optimizations

* more cleanup

* some refactoring

* new files

* flattening of packages

* working commit

* more refactor

* more flattening

* more flattening

* more more refactor

* more optimizations

* more optimizations

* more optimizations

* plonk benchmark

* plonk

* fix r1cs

* resolve kevin's comments

* Update goldilocks/base.go

Co-authored-by: Kevin Jue <kjue235@gmail.com>

* Update goldilocks/base.go

Co-authored-by: Kevin Jue <kjue235@gmail.com>

* Update goldilocks/base.go

Co-authored-by: Kevin Jue <kjue235@gmail.com>

* Update goldilocks/quadratic_extension.go

Co-authored-by: Kevin Jue <kjue235@gmail.com>

* fix: resolve kevin's confusion

---------

Co-authored-by: Kevin Jue <kjue235@gmail.com>
2023-07-24 16:08:17 -07:00
Kevin Jue
9ce7bb7dbb
Step test case with public inputs (#23)
* added step test case

* export solidity code

* just set proof's public input as public variables

* make serialization a command line option

* added flag to output solidity

* some changes to the benchmark file

* used gnark cherry picked bug fix

* removed fuzz testing

* added some logging

* more debug messages and test cases for the hint issue

* removed usage of goldilocks reduce

* removed prints

* removed GoldilocksReduce

* removed prints

* added a todo

* some serialization changes
2023-06-17 19:44:20 -07:00
Kevin Jue
15b7dcbcdb
optimized goldilocks (#22)
* cleaned up qe api

* modified goldilocks poseidon to use optimized goldilocks operations

* better comment

* added goldilocks test cases

* some cleanup and comments

* changed poseidon constaints to frontend.Variable

* fixed double cast

* fixed bug in challenger
2023-06-08 14:22:42 -07:00
Kevin Jue
b3a3aa851b
cleaned up qe api (#21) 2023-06-06 17:56:10 -07:00
Kevin Jue
a516925ad8
Poseidon BN128 (#20)
* initial commit of poseidon bn128

* got challenger working

* deserialize is working

* cleaned up deserialization function a bit

* fixed challenger

* add in the hack to the challenges

* fixed some bugs in poseidon_bn128

* fri verification is working

* some changes for benchmarking

* added decode_block plonky2 data

* initial commit for poseidon_mds_gate

* updated gate test cases

* working poseidon mds gate

* full verifier test case working
2023-06-06 17:36:51 -07:00
Kevin Jue
302b5f5bf1
Upgrade to gnark 0.8 (#18)
* make proof with PIS public input

* upgraded to 0.8 gnark

* reduced pow witness

* fixed bug

* fixed test

* fixed bug

* adding profiling

* changed everything to be pointers

* convert remaining poseidon constants

* added the recursive_very_small

* added more outputs for benchmark
2023-05-25 07:39:06 -07:00
Kevin Jue
cf84b032e2
Rearranged files (#17)
* removed unused file

* change field import

* change import of field package

* changed field import

* moved hash to poseidon and some changes to the field package

* changed file structure
2023-05-19 19:49:14 -07:00
Nicholas Ward
f20852831e fixes, cleanup, and deserialize ProofChallenges 2023-04-12 09:13:38 -07:00
Nicholas Ward
219e6357f3 fix 2023-04-06 15:12:59 -07:00
Nicholas Ward
ad8e851fc6 fixes 2023-04-06 11:34:11 -07:00
Nicholas Ward
f1dc02d30f Poseidon extension function versions, and finished PoseidonGate 2023-04-06 11:15:07 -07:00
John Guibas
6e9f1a7c50 Cleanup repo for release 2023-03-28 10:59:36 -07:00
Kevin Jue
8fe0c7f6b6 added plonky2_verifier_benchmark 2022-11-22 17:57:26 -08:00
Kevin Jue
1ad9e73634 standalone fri circuit 2022-11-17 16:23:14 -08:00
jtguibas
51b98741b8 changes... 2022-10-10 22:44:59 -07:00
jtguibas
fccd386e06 workign deserialization of proof 2022-10-10 18:43:56 -07:00
jtguibas
a058df6099 small refactor of names 2022-10-10 17:59:55 -07:00
jtguibas
cae5d3b45f added public inputs hash test, challenger test 2022-10-10 15:11:32 -07:00
jtguibas
96bfd45884 goldilocks and poseidon 2022-10-07 16:59:02 -07:00