-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional halo2 proofs in CLI #301
Conversation
09027c4
to
1125f17
Compare
powdr_cli/src/main.rs
Outdated
@@ -54,6 +56,11 @@ enum Commands { | |||
#[arg(short, long)] | |||
#[arg(default_value_t = false)] | |||
force: bool, | |||
|
|||
/// Generate a halo2 proof |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be nice to already start with an enum instead of just a bool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the different backends?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to Option<Backend>
ohh so this is the PR with the actual proofs |
1125f17
to
fd5bc4c
Compare
f0e3746
to
dcc3520
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, tiny comments
c9db0da
to
3bf21d1
Compare
This doesn't fully work yet because Halo2 doesn't have direct support to lookups. PSE is currently implementing it in their fork: privacy-scaling-explorations/halo2#185 |
a4c7294
to
766156a
Compare
Lookups are fixed now. |
The test impl<'a, T: FieldElement> CircuitData<'a, T> {
pub fn from(fixed: Vec<(&'a str, Vec<T>)>, witness: Vec<(&'a str, Vec<T>)>) -> Self {
assert_eq!(
fixed.get(0).unwrap().1.len(),
witness.get(0).unwrap().1.len()
); |
If there are no constants or no commits this will fail. We need a way to fake one if it doesn't exist. |
compiler/tests/asm.rs
Outdated
); | ||
let f = "simple_sum.asm"; | ||
let i = [16, 4, 1, 2, 8, 5]; | ||
verify_asm::<GoldilocksField>(f, i.iter().cloned().map(|x| x.into()).collect()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should have a util function for this [i32; N] -> Vec conversion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added in the file itself for now
50410aa
to
a14b18d
Compare
a14b18d
to
30915a0
Compare
Pass
--prove_with halo2
to create a KZG-GWC-Keccak halo2 proof.Fail in the backend if we're not using bn254.
Puts halo2 behind a feature, off by default, enabled with e.g
cargo run --features halo2