Cairo verification working#1
Merged
YofiY merged 8 commits intofeature/spending-conditionsfrom Jul 30, 2025
Merged
Conversation
TODO: the test doesnt compile because the under nutxx/example_proof.json was created using the package cairo-prove, which at the latest version still uses an old version of stwo_cairo_prover and stwo_cairo_verifier, but in the project we use the more recent version (we use commit 335de15 but cairo-prove uses commit 62c3c4a). There are two option: 1. modify our project to use older packages 62c3c4a or 2. fork cairo-prove and update the packages to the latest version. I think option 2 would be better since the verify_cairo function doesn't require a PcsConfig in the newer version, which makes things cleaner to use in cashu
vincentpalma
commented
Jul 30, 2025
|
|
||
| let secret: Secret = Nut10Secret::new( | ||
| Kind::Cairo, | ||
| "PROGRAM_HASH_TODO".to_string(), |
Author
There was a problem hiding this comment.
Here needs to be a hash of the program (Felt type probably)
vincentpalma
commented
Jul 30, 2025
| Some(Witness::CairoWitness(witness)) => witness, | ||
| _ => return Err(Error::IncorrectSecretKind), | ||
| }; | ||
|
|
Author
There was a problem hiding this comment.
TODO: here we also need to verify that the what the witness (Cairo proof) claims to prove match with the program hash in the secret data
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cairo/stwo verification logic working.
Next steps