Commit Graph

135 Commits

Author SHA1 Message Date
Srinath Setty
b5874df449 Small optimizations (#142) 2023-02-13 11:04:35 -08:00
Srinath Setty
c4b07f0925 allow the provider to provide byte representation of a scalar (#140) 2023-02-10 12:36:51 -08:00
Srinath Setty
8faffd38ea Make code generic over a TranscriptEngine (#139) 2023-02-09 18:33:48 -08:00
Srinath Setty
b97786d291 move IPA-specific methods to the provider (#138) 2023-02-06 18:07:14 -08:00
Srinath Setty
0315bd1198 fix wasm build (#137) 2023-02-03 13:34:01 -08:00
Srinath Setty
603c1e2a85 traits for a vector commitment engine and a polynomial evaluation engine (#136)
make spartan generic over the evaluation engine

update version

disable Wasm CI check
2023-02-02 16:21:24 -08:00
Srinath Setty
e7f8d11455 use thiserror (#135) 2023-01-31 18:31:34 -08:00
Srinath Setty
0ae8d15953 add Wasm build to CI (#134) 2023-01-31 16:44:58 -08:00
Srinath Setty
4163665f52 release candidate (#133) 2023-01-31 16:28:11 -08:00
Samuel Burnham
b2adab610a Clippy formatting (#131)
* Clippy with Rust 1.67

* Clippy/Rustfmt with Rust 1.66.1
2023-01-31 14:53:15 -08:00
Srinath Setty
74501936c3 parallel and batch_normalize (#129)
use a macro to remove redundant code

add a test case
2023-01-31 11:03:38 -08:00
Srinath Setty
746af53e08 use serde feature to compute the digest of the shape (#132) 2023-01-31 10:32:49 -08:00
Samuel Burnham
13964b6f16 Add serde proof serialization (#123)
* Bump commit.

* Bump commit.

* (WIP) Add serde support

* Minor fixes

* Use neptune const generics

* Use git patches

* Impl serde for CompressedSNARK

* Update dependencies, revert to typenum

* Formatting

* Update bellperson-nonnative patch

* Cleanup

* Remove bellperson-nonnative fork

* Switch back to fil_pasta_curves

* Update forked dependencies

* Cleanup

* Remove unnecessary patch

* Update to lurk-pasta-msm

---------

Co-authored-by: porcuquine <porcuquine@users.noreply.github.com>
2023-01-31 10:01:08 -08:00
Srinath Setty
0b2b984fd1 release version (#130) 2023-01-30 12:36:11 -08:00
Samuel Burnham
55f6736866 Add Wasm support (#125)
* Add Wasm support

* Use SeedableRng for Wasm randomness

* Fix tests

* Formatting
2023-01-30 11:31:36 -08:00
Nalin
6c6a8746d6 Speed up MSMs for non-GPU accelerated MSMs and architectures that don't support GPU/semolina (#126)
* WASM target support

* fast multiexp for WASM

* add parallelisation for MSM

https://github.com/zcash/halo2/blob/main/halo2_proofs/src/arithmetic.rs
2023-01-27 09:51:08 -08:00
Srinath Setty
d35604fe15 release version (#124) 2023-01-18 10:00:22 -08:00
Srinath Setty
23178ff54d A simplified version of the nonnative gadgets (#122) 2023-01-18 09:40:54 -08:00
Nalin
fa9064a3f7 Delete outdated comment to avoid confusion (#117) 2022-12-21 15:54:11 -08:00
Srinath Setty
6044aff625 Update crate versions (#119)
* update crate versions

* fix clippy issues

* cargo fmt
2022-11-21 10:42:11 -08:00
Srinath Setty
f9672faf23 Make Nova's ecc gadgets read curve parameters from the group trait (#115)
* make ecc gadgets defined over Group rather than PrimeField

* use curve parameters from Group trait
2022-09-22 13:31:55 -07:00
Srinath Setty
d2844089ba update benches (#111) 2022-08-23 15:31:37 -07:00
Srinath Setty
7ec2f57b84 optimize ECC ops (#110)
* optimize ECC ops

* update version
2022-08-23 15:05:04 -07:00
Srinath Setty
3c6867390a optimize point add constraints (#106)
* optimize add constraints

* optimize double by rewriting a constraint involving an inverted element
2022-08-18 08:25:26 -07:00
Srinath Setty
6e408d03a6 simplify signature gadget (#109) 2022-08-16 14:06:08 -07:00
Srinath Setty
faf28e71cd update version (#108) 2022-08-16 11:51:23 -07:00
Srinath Setty
ccc6ccd4c7 Support for arbitrary arity for step circuit's IO (#107)
* support for arbitrary arity for F

* revive MinRoot example

* revive tests

* revive ecdsa

* remove unused code

* use None instead of Some(1u32)

* revive benches

* fix clippy warning
2022-08-16 11:35:17 -07:00
Srinath Setty
0a7cbf925f integrate with neptune's sponge (#105)
* integrate with neptune's sponge

* fix clippy warning

* add checks to ensure at most one squeeze

* add checks to ensure at most one squeeze
2022-08-11 19:03:44 -07:00
Srinath Setty
ddd90f7373 Update crate versions (#104)
* update crates to their latest version

* use latest pasta-msm
2022-08-10 10:57:43 -07:00
Srinath Setty
c7e8782f11 pad two IPA instances to the same size when folding (#103) 2022-07-27 22:21:47 -07:00
Srinath Setty
a56f823ace optimize the non-native arithmetic and hashing costs by using 4 limbs instead of 8 (#102) 2022-07-27 17:09:49 -07:00
Srinath Setty
111abcab38 optimize MinRoot constraint system (#101)
* optimize MinRoot constraint system to not allocate unneeded advice variables

run with multiple MinRoot iterations per Nova step in a loop

* fix clippy warnings
2022-07-27 15:48:03 -07:00
Srinath Setty
06192ac3d4 Optimizations (#100)
* avoid creating commitments to zero vectors

* reduce the number of constraints in each iteration from 4 to 3
2022-07-27 14:07:44 -07:00
Srinath Setty
3dc26fd7e4 Simplifications in Nova's RO (#98)
* rename methods for better clarity

* rename

* Bump version
2022-07-25 12:22:41 -07:00
Srinath Setty
c6fa4d44eb Fix benches so it varies the number of constraints in the augmented circuit in powers of 2 (#97)
* vary the number of constraints in the step circuit

* use a different starting state
2022-07-21 15:00:01 -07:00
Srinath Setty
5d5b9aa244 Fix bench name (#95)
* fix name

* Add 14
2022-07-20 16:05:43 -07:00
Srinath Setty
7d54d992a4 update benches (#94) 2022-07-20 14:31:24 -07:00
Srinath Setty
87a5b07bdd name changes for improved clarity (#93) 2022-07-20 14:09:25 -07:00
Arthur Greef
ed915b2540 ecdsa signature proof (#92)
* ecdsa signature proof

* use the library-provided default circuit

* small reorg

Co-authored-by: Srinath Setty <srinath@microsoft.com>
2022-07-19 13:06:38 -07:00
Srinath Setty
35cb03f977 reorganize traits into a module; cut boilerplate code (#91)
use a default implementation for step circuit
2022-07-14 16:15:45 -07:00
Srinath Setty
704d48b528 update to the latest pasta-msm crate (#89) 2022-07-13 17:00:16 -07:00
Srinath Setty
e373f4633d edits to address clippy with the latest Rust (#90) 2022-07-13 14:46:13 -07:00
Srinath Setty
a04566bb81 MinRoot example improvements (#88)
* support multiple iterations of MinRoot per Nova step

* small edits to println

* fix declaration
2022-07-11 13:00:42 -07:00
Srinath Setty
ff40d17cc4 Nova-based VDF using MinRoot as an example (#86)
* add the MinRoot VDF example

* optimize a bit

* optimization and cleanup

* clippy

* add examples to CI

* use inbuilt pow_vartime
2022-07-07 18:30:43 -07:00
Srinath Setty
63f08c0e4a Support non-determinism with a minimal API (#85)
* support non-determinism with small changes to the interface

* update benches to use the new API

* add an example that exercises non-deterministic advice at each step of recursion

* tiny rename

* Address clippy; update version
2022-07-07 12:17:56 -07:00
Srinath Setty
6667d2f8b5 Abstract the RO used in the circuit with traits (#84)
* cleanup RO usage inside the circuit: use traits

* Add a note

* rename types for clarity
2022-07-05 16:24:12 -07:00
Srinath Setty
0863a732ff Add asserts for constraint count (#83)
* Add asserts for constraint count

* switch to Standard strength
2022-07-05 14:50:17 -07:00
Srinath Setty
c29030b2d7 Release Candidate (#82)
* update version and README

* move tests to bellperson adapter and remove tests folder; make bellperson adapter private
2022-07-01 16:03:19 -07:00
Srinath Setty
0ff2e57bfa Spartan variant with an IPA-based polynomial commitment scheme for compressing IVC proofs (#80)
* cleanup code

* compiles

* additional plumbing

* add padding

* Add missing file

* integrate

* add a separate test

* cleanup

* cleanup

* add checks for outer sum-check

* sum-checks pass

* sum-checks pass

* sum-checks pass

* Add polycommit checks to the end

* switch to pasta_msm

* clippy

* remove int_log

* switch to pasta_curves

* clippy

* clippy

* add a special case for bases.len() = 1

* use naive MSM to avoid SIGFE error for smaller MSMs

* add rayon parallelism to naive MSM

* update comment since we already implement it

* address clippy

* cleanup map and reduce code

* add parallelism to final SNARK creation and verification

* add par

* add par

* add par

* add par

* store padded shapes in the parameters

* Address clippy

* pass padded shape in params

* pass padded shape in params

* cargo fmt

* add par

* add par

* Add par

* cleanup with a reorg

* factor out spartan-based snark into a separate module

* create traits for RelaxedR1CSSNARK

* make CompressedSNARK parameterized by a SNARK satisfying our new trait

* fix benches

* cleanup code

* remove unused

* move code to Spartan-based SNARK

* make unused function private

* rename IPA types for clarity

* cleanup

* return error types; rename r_j to r_i

* fix duplicate code
2022-07-01 15:53:00 -07:00
iontzialla
81b12232fe Add benches (#79)
* add benches

* fix error

* put snark in a black_box when benchmarking verification time

* fix error in benches
2022-06-14 12:32:44 -07:00