-
Notifications
You must be signed in to change notification settings - Fork 83
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
Create twitter_reset_regex.circom from zk-regex #143
Conversation
How is it possible that twitter contract tests pass if you updated the verifier and not the test with a new sample proof in https://github.com/zkemail/zk-email-verify/blob/main/packages/twitter-verifier-contracts/src/test/TestTwitter.t.sol -- do you mind double checking that the test is testing your code correctly? |
@Divide-By-0 Sure! I did do some basic sanity checks, that I could actually make the unit tests fail if i changed some other inputs, because I too was a bit surprised that they passed :) But I'll take a closer look at it. |
Well it should fall with new inputs for sure, but I'm worried it's just ignoring the verifier you uploaded for some reason. |
Also #65 is an easy issue to also address while we make these changes! We can add another test for a generic twitter notification for this. |
Also, we are mid-move for these examples to be in a different folder (not packages), so you may have to reproduce your changes on https://github.com/zkemail/proof-of-twitter/ as well. |
|
@Divide-By-0 I assume that the tests should fail if i change proof_a, proof_b and proof_c in TestTwitter.t.sol to some junk data, right?
|
Oops lol. Do you mind debugging this and figuring out what's wrong? I'll have a minute to check later today as well. |
@Divide-By-0 Ok, now I have at least managed to make the tests fail. I was running the wrong tests... Btw, I updated the README instructions for setting up the forge tests: Regarding the actual test suite, I'm probably missing some very vital step :) maybe I need to deploy a contract or upload new keys somewhere.. I'll continue investigating it. |
Tests seem to pass in CI? Also, we take versions from the remapping, not the docs so might want to put that there too! Odd that tests don't run with new Oz versions, we should be up to date on that for security reasons. |
@Divide-By-0 Yeah, for example, the first error I encountered was that
Yep, it passes in CI. I was a big unclear when I said that i could make the tests fail. I meant that I can make them fail if I change the proofs in TestTwitter.t.sol (before, I claimed that they pass even if i changed the proofs, but that was just a misunderstanding, sorry about that :) ).
Ok, I'll look at that. |
It looks like testverifytestemail is failing; do you know what might be causing that? |
@Divide-By-0 When I trace the execution of the tests, it seems that it halts on I converted this PR to a draft again. I fear that it can take a while for me to solve it, so if you need it more urgently, maybe it's better to assign the issue to someone with more knowledge about this. |
Hey @foolo , As we are moving Twitter example to https://github.com/zkemail/proof-of-twitter/ would be able to make the PR there? The tests are working fine there, but there is an issue (zkemail/proof-of-twitter#9) to improve them. I will add more info there. |
@saleel Sure, i can look at it and see if there is something from this PR that should be updated in the new repo, such as the docs and scripts. |
Thank you 🙏 |
i checked the new repo and these changes are no longer relevant |
Ah ok. Sorry about that. I should have looked at this PR earlier. |
@saleel No problem, I was kind of stuck on this one anyway :) |
Use zk-regex to create
twitter_reset_regex.circom
(and addregex_to_circom.sh
, with which it can be repeated)Remove
libs/regex_to_circom/
Fixes #116