forked from zcash/halo2
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement
crate halo2_alt
with fflonk
backend
- Loading branch information
Showing
16 changed files
with
3,115 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
[workspace] | ||
members = [ | ||
"halo2", | ||
"halo2_alt", | ||
"halo2_proofs", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[package] | ||
name = "halo2_alt" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
halo2_proofs = { path = "../halo2_proofs" } | ||
rand_core = { version = "0.6", default-features = false } | ||
rayon = "1.8" | ||
blake2b_simd = "1" | ||
|
||
[dev-dependencies] | ||
rand_chacha = "0.3" | ||
|
||
[features] | ||
sanity-checks = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use crate::protocol::Protocol; | ||
use halo2_proofs::plonk::Error; | ||
use rand_core::RngCore; | ||
use std::fmt::Debug; | ||
|
||
pub mod fflonk; | ||
|
||
pub trait Circuit<F>: Debug { | ||
type WitnessBuf: Debug + Default; | ||
|
||
fn protocol(&self) -> Protocol<F>; | ||
|
||
fn preprocess(&self) -> Result<Vec<Vec<F>>, Error>; | ||
|
||
fn witness( | ||
&self, | ||
phase: usize, | ||
values: &[&[F]], | ||
challenges: &[F], | ||
buf: &mut Self::WitnessBuf, | ||
rng: impl RngCore, | ||
) -> Result<Vec<Vec<F>>, Error>; | ||
} |
Oops, something went wrong.