Skip to content

ZCash support and updated LLZK#9

Open
0xddom wants to merge 13 commits into
mainfrom
dani/zcash-support
Open

ZCash support and updated LLZK#9
0xddom wants to merge 13 commits into
mainfrom
dani/zcash-support

Conversation

@0xddom

@0xddom 0xddom commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Changes for supporting ZCash's Halo2 and updating the LLZK dependency

@0xddom 0xddom requested a review from a team July 2, 2026 15:18

@iangneal iangneal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overal LGTM but I have a few questions

@@ -0,0 +1,183 @@
module attributes {llzk.fields = [#felt.field<"f", 21888242871839275222246405745257275088548364400416034343698204186575808495617>],llzk.lang = "haloumi"} {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit:

Suggested change
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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<[]> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any way you can make F: PrimeField instead of F: Field? If so, you can use PrimeField::from_u128.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants