A proof-of-concept implementation of the LatticeFold folding scheme engineered by Nethermind based on the work LatticeFold: A Lattice-based Folding Scheme and its Applications to Succinct Proof Systems by Dan Boneh and Binyi Chen.
DISCLAIMER: This is a proof-of-concept prototype, and in particular has not received careful code review. This implementation is provided "as is" and NOT ready for production use. Use at your own risk.
The rust-toolchain file pins the version of the Rust toolchain, which the LatticeFold library builds with, to the specific version nightly-2024-11-05
.
One can install the nightly-2024-11-05
toolchain by invoking:
rustup install nightly-2024-11-05
After that, use cargo
, the standard Rust build tool, to build the library:
git clone https://github.com/NethermindEth/latticefold.git
cd latticefold
cargo build --release
Import the library:
[dependencies]
latticefold = { git = "https://github.com/NethermindEth/latticefold.git", package = "latticefold" }
Available packages:
latticefold
: main crate, contains the non-interactive folding scheme implementation, together with the Ajtai commitment scheme, R1CS/CCS structures, Fiat-Shamir transcript machinery, etc.cyclotomic-rings
: contains the trait definition of a ring suitable to be used in the LatticeFold protocol, a few ready-to-use rings and short challenge set machinery.
Check latticefold-examples/README.md for examples.
Currently, the only way to define a circuit to be folded is by specifying it as a rank-1 constraint system (R1CS) or a customizable constraint system (CCS).
The crates in this repository are licensed under either of the following licenses, at your discretion.
- Apache License Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
Unless you explicitly state otherwise, any contribution submitted for inclusion in this library by you shall be dual licensed as above (as defined in the Apache v2 License), without any additional terms or conditions.
- This project is built on top of our fork of lattirust library originally developed by Christian Knabenhans and Giacomo Fenzi.
- We adapted the sumcheck protocol from Jolt to the ring setting.
- A lot of definitions are directly transferred from sonobe library.
- The implementation is supported by Ethereum Foundation ZK Grant.