Skip to content

Add pure verification method #366

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

Closed
saleel opened this issue Oct 1, 2023 · 2 comments
Closed

Add pure verification method #366

saleel opened this issue Oct 1, 2023 · 2 comments
Labels
feature 🚀 This is enhancing something existing or creating something new

Comments

@saleel
Copy link
Contributor

saleel commented Oct 1, 2023

The verifyProof() method currently does a little more that just proof verification - it store the nullifier in the contract (to prevent verifyProof being called again with same proof).

But there could be use cases where one would want to simply verify the proof - maybe even offchain, and also verify multiple time. Currently this is possible by calling the Verifier contract directly, but the caller would need to get group merkleRoot (and other data ) by calling Semaphore contract first. Additionally they will need to check if the proof was computed using an old merkleRoot themselves (which is already implemented in verifyProof).

We can add another method that does only verification without doing any state changes (saving the nullifier). In fact, this method could be called verifyProof, and the current verifyProof could be something like validateProof() (like validating a ticket which could be done only once).

@saleel saleel added the feature 🚀 This is enhancing something existing or creating something new label Oct 1, 2023
@cedoor
Copy link
Member

cedoor commented Oct 2, 2023

I think this makes a lot of sense 👍🏽 I already created an issue for it here #329. I'll close this one and add a reference there to your description.

Please feel free to open a PR if you want!

@cedoor cedoor closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2023
@saleel
Copy link
Contributor Author

saleel commented Oct 2, 2023

Oh right, sorry. I remember we creating it, but couldn't find it when I searched yesterday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🚀 This is enhancing something existing or creating something new
Projects
None yet
Development

No branches or pull requests

2 participants