165 Commits

Author SHA1 Message Date
Kevin Jue
2c361fa5e3 fix for V-SCT-VUL-003 2023-12-18 12:54:36 -08:00
Kevin Jue
85d20ce656 fix for V-SCT-VUL-002 2023-12-18 12:46:53 -08:00
Kevin Jue
9e963933f9 fix for V-SCT-VUL-001 2023-12-18 12:35:12 -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
John Guibas
13624e4daf
Merge pull request #36 from succinctlabs/revert-35-uma/optimizations 2023-10-11 17:43:23 -07:00
puma314
0c677ddd0d
Revert "Range check optimizations" 2023-10-11 17:39:52 -07:00
puma314
c23b174535
Merge pull request #35 from succinctlabs/uma/optimizations
Range check optimizations
2023-10-11 17:39:19 -07:00
Uma Roy
8b96b0fd87 Removed extraneous range check 2023-10-11 17:38:57 -07:00
Uma Roy
4841d382d7 Modified another name 2023-10-11 17:33:09 -07:00
Uma Roy
19da211317 rename another file 2023-10-11 15:23:53 -07:00
Uma Roy
ca5d0904d1 benchmark works now 2023-10-11 15:20:42 -07:00
Uma Roy
3aef7954ed All tests pass 2023-10-11 14:53:34 -07:00
Uma Roy
b173b28649 checkpoint 2023-10-11 12:20:48 -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
d8b919a403 Fixed underconstrained in range check and added dummy mode to benchmark.go 2023-10-11 00:28:20 -07:00
Uma Roy
e026e73359 Added reduce to benchmark 2023-10-10 22:56:44 -07:00
Uma Roy
90e2f5f1b1 Added benchmark 2023-10-10 22:54:16 -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
Kevin Jue
7bd0035e65
range check inputted plonky2 proof (#29)
* 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>

* added range check for the inputted proof

* removed the go.mod replace directive

* removed some hacky code

* removed duplicate import

* renamed rangecheckQEVariable to rangecheckQE

* resolved conflict

---------

Co-authored-by: John Guibas <john@succinct.xyz>
2023-07-24 16:18:37 -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
103c7ca47d
proof with small public input (#28) 2023-06-26 12:09:14 -07:00
Kevin Jue
867b3abd7c
serialize proof and witness (#27) 2023-06-22 14:59:15 -07:00
John Guibas
fc45e7fb70
Merge pull request #25 from succinctlabs/john/fix-dependencies
fix: remove local replaement with gnark dependencies based on develop branch
2023-06-20 16:53:41 -07:00
John Guibas
37984c52c7 Fix go mod dependencies + goldilocks fixes 2023-06-20 16:03:41 -07:00
Kevin Jue
71cfa20fcb
output proof (#24) 2023-06-19 08:27:19 -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
ecfc4a7b2b added serialization support for benchmark.go 2023-06-07 11:33:18 -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
Kevin Jue
a415c95f6f
Refactor gate deserialization (#16)
* helper functions for coset_interpolation_gate

* coset interpolation gate working

* hard coded the coset gate (for now)

* refactored gate serialization
2023-05-18 15:30:32 -07:00
Kevin Jue
5bb7cc6411
Coset Interpolation Gate (#15)
* helper functions for coset_interpolation_gate

* coset interpolation gate working

* hard coded the coset gate (for now)
2023-05-18 13:06:30 -07:00
Kevin Jue
67aa8b9d77
exponentiation gate (#14) 2023-05-17 18:28:34 -07:00
Kevin Jue
3f6e2ade98
reducing gate (#13) 2023-05-17 18:09:30 -07:00
Kevin Jue
2823cfbbcb
reducing extension gate (#12) 2023-05-17 17:40:43 -07:00
Kevin Jue
c98d65b48a
multiplication extension gate (#11) 2023-05-17 17:05:43 -07:00
Kevin Jue
ea96e7a176
Arithmetic Extension Gate (#10)
* initial commit for arithmetic extension gate

* fixed bug

* added regex for arithmeticExtensionGate
2023-05-17 16:52:42 -07:00
Kevin Jue
219a2ea61b
Consolidate gate test cases (#9)
* consolidated gate tests

* added recursive step circuit info

* added all the test cases for the recursive step gates
2023-05-16 21:35:02 -07:00
Kevin Jue
ccb828bdb1
Random Access Gate (#8)
* first (non working) version of random access gate

* fixed a bug

* got random access gate workgin

* added parsing logic for the random access gate
2023-05-16 17:11:01 -07:00
Kevin Jue
a0d5ad37de
Base sum gate (#7)
* initial version of base_sum_gate

* add recursive circuit benchmark files

* added step circuit data and contant gate test

* moved step testing data into gate_testing_utils

* added test case for basesum gate

* added test for arithmetic_gate
2023-05-16 11:13:42 -07:00
Kevin Jue
11f5ee28c6
Circuit modifications for recent Plonky2 changes (#5)
* pretty print fibonacci data files

* added in new dummy proof serialized data

* updated powresponse calculation in the challenger chip

* changes to reflect these plonky2 changes:  40aecc8e95

* modified benchmark to accept circuit name
2023-05-11 15:31:32 -07:00
Kevin Jue
01f26f5158
Merge pull request #4 from succinctlabs/npward-plonky2-gates
remove unused JSON file
2023-05-11 14:18:13 -07:00
Nicholas Ward
70e24b1289 remove unused JSON file 2023-05-11 09:36:09 -07:00
Kevin Jue
2fbbcec029
Merge pull request #2 from succinctlabs/npward-plonky2-gates
Plonky2 Gates
2023-05-10 09:55:21 -07:00
Nicholas Ward
2d7f5ecf50 generate proof challenges instead of receiving through JSON 2023-05-01 10:26:45 -07:00