Electron-Labs / ed25519-circom

ED25519 implementation in Circom
https://docs.electronlabs.org/
106 stars 15 forks source link

Batch verify not working #66

Open ghost opened 2 years ago

ghost commented 2 years ago

Thanks for the repo, and it is very cool! I wanted to try out batch verify but the tests failed. Does it work? Do you have benchmarks of the batch verify circuit?

rahulghangas commented 2 years ago

@saideng the test is seems to be working for me. What's the error you're getting?

A thing to note, the test will require more than 9-10G of memory, does your machine running the test satisfy that?

ghost commented 2 years ago

@saideng the test is seems to be working for me. What's the error you're getting?

A thing to note, the test will require more than 9-10G of memory, does your machine running the test satisfy that?

The test case with one signature works, but the test cases with two and three signatures do not work for me. I am using MacBook Pro with 16gb memory.

jinankjain commented 2 years ago

@saideng By any chance is it M1 (Macbook pro)?

rahulghangas commented 2 years ago

@saideng this is likely a resource issue, the test case with 2 and 3 signatures would require more memory (about 20 and 30G). You can add swap space on your mac and use that to compile the circuits and compute corresponding witnesses. If you're getting a specific error, could you post that so that we can investigate further

ghost commented 2 years ago

@jinankjain Yes, it is M1. @rahulghangas I tried to compile a 3 signature batch verify and got # of Constraints: 10953937.

I think this is not scalable unless using recursive construction. Have you tried other tools or libraries for recursive SNARK?