ZCash support and updated LLZK#9
Conversation
haloumi-ir@0.5.12 haloumi-llzk@0.5.12 Generated by cargo-workspaces
haloumi@0.5.15 haloumi-core@0.5.15 haloumi-llzk@0.5.15 Generated by cargo-workspaces
iangneal
left a comment
There was a problem hiding this comment.
Overal LGTM but I have a few questions
| @@ -0,0 +1,183 @@ | |||
| module attributes {llzk.fields = [#felt.field<"f", 21888242871839275222246405745257275088548364400416034343698204186575808495617>],llzk.lang = "haloumi"} { | |||
There was a problem hiding this comment.
Nit:
| module attributes {llzk.fields = [#felt.field<"f", 21888242871839275222246405745257275088548364400416034343698204186575808495617>],llzk.lang = "haloumi"} { | |
| module attributes {llzk.fields = [#felt.field<"f", 21888242871839275222246405745257275088548364400416034343698204186575808495617>],llzk.lang = "halo2"} { |
I think we want llzk.lang to be the source language name rather than the name of the frontend tool
There was a problem hiding this comment.
Also I think you could just use "bn254" as the field instead of re-defining it here.
| @@ -1,40 +1,26 @@ | |||
| module attributes {veridise.lang = "llzk"} { | |||
| struct.def @Signal<[]> { | |||
There was a problem hiding this comment.
Signal struct throwback, it's been a while since we had that around!
| @@ -0,0 +1,35 @@ | |||
| module attributes {llzk.fields = [#felt.field<"f", 21888242871839275222246405745257275088548364400416034343698204186575808495617>],llzk.lang = "haloumi"} { | |||
| struct.def @Main { | |||
| struct.member @out_0 : !felt.type<"f"> {llzk.pub} | |||
There was a problem hiding this comment.
Just as a sanity check for myself, but should any of these outputs also be marked as signal?
| @@ -0,0 +1,35 @@ | |||
| module attributes {llzk.fields = [#felt.field<"f", 21888242871839275222246405745257275088548364400416034343698204186575808495617>],llzk.lang = "haloumi"} { | |||
| struct.def @Main { | |||
There was a problem hiding this comment.
Should this also be marked in the module as the main entry point with llzk.main?
| // Utility function for creating a field element from a native value. Complexity is O(n) where | ||
| // n is the value of the number so don't use very large numbers with this. | ||
| fn f(&self, n: usize) -> Value<F> { | ||
| Value::known(iter::repeat(F::ONE).take(n).sum()) |
There was a problem hiding this comment.
Is there any way you can make F: PrimeField instead of F: Field? If so, you can use PrimeField::from_u128.
Changes for supporting ZCash's Halo2 and updating the LLZK dependency