I want to implement zk-SNARKs based anonymous voting. Are there examples or packages available for substrate? Where can I get started.
-
There are plenty of zk-SNARK libraries written in rust. Not sure if they are usable under no_std environment. As long as it works, it should be pretty straightforward to use that inside a pallet. In the early days there's a project called ZeroChain developed by the LayerX team, but its development was halt for some time. It's still a good code reference though.– h4x3rotabMar 24, 2022 at 7:07
1 Answer
I know that https://manta.network uses ZK for their solution, so you could see how they have gone about things: https://github.com/Manta-Network/manta-signer. They did a sub0 talk.
I am a beginner in this space, but plonky2 might be fast enough in wasm if it switches to using portable simd (and that allows wasm simd to happen).
For ZK specific stuff, https://crypto.stackexchange.com/ is also a good place to ask questions.