* refactor: Remove redundant PrimeField bound in various modules
* refactor: Refactor main Group trait to use group::Group
- the main Group trait now uses ::zkcrypto::group::Group
- Refactored the usage of generic type associated 'Scalar' across multiple files and functions from 'G::Scalar' to fully qualified '<G as Group>::Scalar'.
- No new features were added, functionality remained the same, changes were mostly aimed at improving type inference and handling.
* Revert "refactor: Refactor main Group trait to use group::Group"
This reverts commit 5ee0590588.
* refactor: Deleted a redundant `ScalarMul` helper trait
* refactor: Refactor `to_transcript_bytes`
* refactor: refactor R1CS Shape checking in Spartan checks
- Introduced a new function `check_regular_shape` in `r1cs.rs` to enforce regularity conditions necessary for Spartan-class SNARKs.
* refactor: Refactor sumcheck.rs prove_quad_* for readability
- Extracted the calculation of evaluation points to its new function `compute_eval_points`, enhancing code reusability within `prove_quad` and `prove_quad_batch` functions.
- Used struct `PolynomialMultiplier` with a corresponding test
- Added `proptest` to dependencies for property-based testing
- Created property-based test to verify big number decomposition under various conditions
* feat; benchmark compressed SNARK with computational commitments
- labeled types for compressed SNARKs in benchmarks, both with and without computational commitments, enhancing the functionality.
- Extended benchmark testing to include compressed SNARK with computational commtiments
* fix: use flat sampling mode for computational commitments, reduce circuit sizes
* refactor: change the order of Keccak Squeeze's input
- Redefine the input sequence for the `compute_updated_state` within the `squeeze` method in `Keccak256Transcript`.
- Modify the expected hash outcomes in the `test_keccak_transcript_with` function in `keccak.rs`.
* refactor: Refactor Keccak256Transcript
- Replaced the transcript vector with a `Keccak256` instance, improving data handling and memory usage.
- Refactored `compute_updated_state` to work directly on a given `Keccak256` instance, reducing unnecessary object creation.
- this change roughly amounts to putting the transcript at the start of squeeze's input array
* refactor: simplify hasher_lo, hasher_hi
* test: Enhance Keccak transcript with backward compatibility test
- Introduces new helper functions to assist with the backward-compatibility intesting process (`compute_updated_state_for_testing`, `squeeze_for_testing`)
- Adds a new test `test_keccak_transcript_incremental_vs_explicit` that checks for consistency between incremental and independent explicit transcript computations
* bn256+grumpkin from halo2curves
* chore: Integrate halo2curves more extensively
- Extend existing tests with additional test cases using the new curve types
* fix: Assign correct orders to bn256 and grumpkin scalar fields
- Swap scalar orders between grumpkin and bn256 in `impl_traits!` implementation
* test: Finish improving test integration with halo2curves
- Enhances test coverage for `pasta_curves` and `halo2curves`
- Cleans up commented code in `test_ivc_nontrivial` and `test_ivc_nontrivial_with_compression` tests
- Updates relevant test cases in `src/lib.rs` to include new curve tests
* chore: Remove commented-out/uneeded code in bn254_grumpkin.rs
* test: reproduce test_from_label for bn254_grumpkin
- Implement the `from_label_serial` function in bn254_grumpkin provider
- Add a test to compare parallel and serial implementations of `from_label` function
* refactor: Clean up to_coordinate & summarize changes
* refactor: rename bn254_grumpkin -> bn256_grumpkin
* test: Expand testing for public params digest using bn256 and grumpkin
* chore: Update halo2curves dependency in Cargo.toml
- Updated the `halo2curves` dependency in `Cargo.toml` to the latest version `0.1.0` from a specific git branch.
* refactor: Refactor multi-exponentiation methods across providers
- Updated bn256_grumpkin.rs to use the cpu_best_multiexp function from pasta provider instead of its native function.
- Modified visibility of cpu_best_multiexp function in pasta.rs from private to crate level.
* chore: set up dependencies to import the correct getrandom feature on Wasm
---------
Co-authored-by: Leo Alt <leo@ethereum.org>
* add sha256 bench
* feat: Refactor sha256 benchmark and update dependencies
- Refactored the `sha256.rs` benchmarking file by replacing the former `hex_literal::hex` usage with a newly created `decode_hex` function.
- Updated the "Test vectors" section to work with the new `decode_hex` function to compute digests in `Sha256Circuit` instances.
- adapted to new APIs for RecursiveSNARK
- Amended the `Cargo.toml` file to include the `sha2` package dependency, version `0.10.7`.
- added the bench target
* cargo fmt
---------
Co-authored-by: Srinath Setty <srinath@microsoft.com>
* feat: Integrate flamegraph profiling in benchmarks
- Introduce "flamegraph" feature flag for optional profiling integration
- Add benchmark profiling support in `compressed_snark` and `recursive_snark` groups
- Update Cargo.toml with `pprof` and `cfg-if` dependencies
* ci: Build benches to make sure they don't bit-rot
- Integrate bench build step into GitHub Actions workflow
* 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>
* refactor: make circuit tests generic wrt curves
- Improve modularity by introducing generic `test_recursive_circuit_with` function in `src/circuit.rs`
- Refactor `test_recursive_circuit` to utilize the new function
- Implement type constraints for `test_recursive_circuit_with` function
* refactor: make bellperson tests generic in type of group
- Introduce `test_alloc_bit_with` function utilizing generic types
- Adapt existing `test_alloc_bit` function to use the new `test_alloc_bit_with` function with correct types
* refactor: make the nifs test generic in the type of group
* refactor: make the ivc tests generic in the type of curve
* refactor: simplify generics in tests
* make the keccak tests generic
* make the poseidon tests generic
* make the spartan tests generic
* 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>