Commit Graph

21 Commits

Author SHA1 Message Date
François Garillot
1e6bf942e2 [refactorings] Leftovers (pot-pourri?) (#184)
* test: compute_path

* refactor: path computation

- Improve path concatenation by utilizing built-in `join` method

* refactor: replace `PartialEq` with derived instance

- Derive `PartialEq` for `SatisfyingAssignment` struct
- Remove redundant manual implementation of `PartialEq`

Cargo-expand generates:
```
        #[automatically_derived]
        impl<G: ::core::cmp::PartialEq + Group> ::core::cmp::PartialEq
        for SatisfyingAssignment<G>
        where
            G::Scalar: PrimeField,
            G::Scalar: ::core::cmp::PartialEq,
            G::Scalar: ::core::cmp::PartialEq,
            G::Scalar: ::core::cmp::PartialEq,
            G::Scalar: ::core::cmp::PartialEq,
            G::Scalar: ::core::cmp::PartialEq,
        {
            #[inline]
            fn eq(&self, other: &SatisfyingAssignment<G>) -> bool {
                self.a_aux_density == other.a_aux_density
                    && self.b_input_density == other.b_input_density
                    && self.b_aux_density == other.b_aux_density && self.a == other.a
                    && self.b == other.b && self.c == other.c
                    && self.input_assignment == other.input_assignment
                    && self.aux_assignment == other.aux_assignment
            }
        }
```

* refactor: avoid default for PhantomData Unit type

* refactor: replace fold with sum where applicable

- Simplify code by replacing `fold` with `sum` in various instances

* refactor: decompression method in sumcheck.rs

* refactor: test functions to use slice instead of vector conversion

* refactor: use more references in functions

- Update parameter types to use references instead of owned values in various functions that do not need them
- Replace cloning instances with references
2023-06-19 16:11:42 -07:00
Chiro Hiro
af886d6ce7 Improve performance of recursive (#163)
* Improve performance of recursive

* Fix the test after rebase

* Fix CI/CD warnings

* Update benchmark to work with new interface of RecursiveSNARK

* Fix example to make sure step 1 is correct

* refactor: Removes unneeded pass-by value in verification

- Update function arguments to use borrowing instead of passing ownership

* Resolve the conflict with upstream branch

* refactor: Avoid extra input cloning in RecursiveSNARK::new

* Update criterion to 0.5.1 to prevent the panic with its plot

* Fix benchmark issue with new recursive_snark instance

* Fix CI/CD warning with

* refactor: Make mutation easier to observe

- Utilize mutable references to Points for better memory management

* chore: Downgrade clippy dependency for compatibility

---------

Co-authored-by: François Garillot <francois@garillot.net>
2023-06-19 12:52:57 -07:00
Samuel Burnham
cddd707fad chore: update to ff/group 0.13 (#166)
* chore: update to ff/group 0.13 and associated dependencies

Updates:
- zkcrypto/ff, zkcrypto/group to 0.13,
- bellperson to 0.25,
- pasta_curves to 0.5.1, and removes the fil_pasta_curves fork
- pasta-msm should no longer need a fork (WIP)

Adapts source in function, mostly for const usage and API updates.

* expose the portable feature of pasta-MSM

* update pointer to pasta-msm

* Clippy

---------

Co-authored-by: François Garillot <francois@garillot.net>
2023-05-10 12:15:17 -07:00
Srinath Setty
3b3ae70db3 A more optimal preprocessing SNARK (#158)
* a more optimal preprocessing SNARK

* update version

* cleanup; address clippy
2023-03-31 18:54:32 -07:00
Srinath Setty
7b1bb44e45 spark-based commitments to R1CS matrices (#152)
* spark-based commitments to R1CS matrices

* small fixes
2023-03-20 18:16:06 -07:00
Srinath Setty
1e4995274b Separate prover and verifier keys in CompressedSNARK (#145)
* checkpoint

* simplify further

* checkpoint

* gens --> ck

* update benches

* address clippy

* cleanup

* update version
2023-03-02 18:36:13 -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
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
Nalin
fa9064a3f7 Delete outdated comment to avoid confusion (#117) 2022-12-21 15:54: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
6e408d03a6 simplify signature gadget (#109) 2022-08-16 14:06:08 -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
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
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
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