Skip to content
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

introduce PackedProofs to semaphore-rs #85

Merged
merged 4 commits into from
Sep 16, 2024
Merged

introduce PackedProofs to semaphore-rs #85

merged 4 commits into from
Sep 16, 2024

Conversation

pdtfh
Copy link
Contributor

@pdtfh pdtfh commented Sep 16, 2024

Packed proofs are a more developer-friendly way of passing ZKPs. This introduces support for packed proofs as used by World App, Developer Portal, helper contracts.

Copy link
Contributor

@ewoolsey ewoolsey left a comment

Choose a reason for hiding this comment

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

Paolo this looks good to me! Funny I just implemented this exact thing on Friday in another repo. It definitely belongs here though. TY!


let packed_proof = PackedProof::from(proof);

assert_eq!(packed_proof.to_string(), "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000008");
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a test that parses from string (with or without 0x)?

And another that serializes/deserializes to json?

@pdtfh pdtfh merged commit 8db6487 into main Sep 16, 2024
4 of 7 checks passed
@pdtfh pdtfh deleted the packed-proof branch September 16, 2024 18:17
pdtfh added a commit that referenced this pull request Sep 16, 2024
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.

4 participants