A high-performance implementation of HyperNova with tree folding capabilities for efficient zero-knowledge proof generation.
This repository contains an independent implementation of HyperNova, a zero-knowledge proof system that enables efficient folding of computation circuits. The implementation includes specialized tree folding algorithms that provide significant performance improvements for batch proof generation.
The codebase is organized into two main components:
The main HyperNova implementation containing:
- Folding schemes: HyperNova and Nova folding protocols
- Tree folding: Parallel tree folding algorithms for batch proofs
- Circuits: Augmented circuits for sequential and parallel execution
- Gadgets: Cryptographic gadgets for constraint systems
- Providers: Commitment scheme implementations (Pedersen, Poseidon, Zeromorph)
A high-performance Spartan proof system implementation providing:
- Committed relaxed R1CS proofs
- Polynomial commitment schemes
- Zero-knowledge proofs and arguments
- Efficient HyperNova folding with optimized constraint systems
- Parallel tree folding for batching multiple proofs
- Multiple commitment schemes (Pedersen, Poseidon, Zeromorph)
- Cycle-fold optimization for recursive proof composition
- Multi-linear extensions and sumcheck protocols
- Comprehensive examples and benchmarks
# Build the main library
cargo build --release
# Run tests
cargo test
# Run examples
cargo run --example hypernova_simple
cargo run --example parallel_tree_fold_exampleThe repository includes several examples demonstrating different use cases:
hypernova_simple.rs- Basic HyperNova proof generationparallel_tree_fold_example.rs- Parallel tree folding demonstrationsequential_sha256_example.rs- SHA256 circuit folding
This code is based on a fork of the Nexus zkVM HyperNova implementation. The original implementation has been extracted and modified to focus specifically on HyperNova tree folding capabilities.
This project maintains the same licensing as the original Nexus zkVM implementation.
Contributions are welcome! Please ensure all tests pass and follow the existing code style.