akosba / jsnark

A Java library for zk-SNARK circuits
MIT License
207 stars 85 forks source link

verifying proof on blockchain #16

Closed Mahsa-Bastankhah closed 5 years ago

Mahsa-Bastankhah commented 5 years ago

Hi.Can a prover put her proof that has created using jsnark on blockchain and is there any smart contract auto created by jsnark that can verify these proofs?I mean something like what Zokrates does.

HarryR commented 5 years ago

There is an example created by appliedblockchain which uses jsnark in combination with ethsnarks: https://github.com/appliedblockchain/jsnark-ethsnarks-examples

This relies on exporting your jsnark or xjsnark circuit to the extended pinocchio opcode format, which can then be interpreted by ethsnarks.

However, there are some incompatibilities with ethsnarks which means it can't handle all of the opcodes correctly.

akosba commented 5 years ago

Hi.Can a prover put her proof that has created using jsnark on blockchain and is there any smart contract auto created by jsnark that can verify these proofs?I mean something like what Zokrates does.

As HarryR suggested, you might want to look into other tools that can help with the integration. Auto creation of smart contracts is not supported by the current version.