fluidex / plonkit

A zkSNARK toolkit to work with circom zkp DSL in plonk proof system.
https://t.me/fluid_dex
MIT License
158 stars 26 forks source link

Error calling generate-verifier #7

Closed bitcartel closed 3 years ago

bitcartel commented 3 years ago

plonkit generate-verifier

plonkit generate-verifier --verification_key vk.bin --sol verifier.sol

Both calls return same error:

thread 'main' panicked at 'must read the template: IOError(Os { code: 2, kind: NotFound, message: "No such file or directory" }, "contract")', /home/test/.cargo/git/checkouts/solidity_plonk_verifier-6ecbad31843ffc31/c19a11c/bellman_vk_codegen/src/lib.rs:66:66 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

vk.bin file exists.

lispc commented 3 years ago

did you use the latest code? The reason seems like it can not find contrib/template.sol. This file should be in plonkit/contrib/template.sol. Can you check wether the file is there?

bitcartel commented 3 years ago

Installed a few days ago with: cargo install --git https://github.com/Fluidex/plonkit

Template.sol is there in .cargo: ~/.cargo/git/checkouts/plonkit-6f16daad50905a49/953229b/contrib $ ls process_circom_circuit.sh template.sol

lispc commented 3 years ago

I see. For now i think you have to clone the repo code and cargo build --release then use the tool. Because only by this, the plonkit can open 'contrib/template.sol' successfully.

We will fix cargo install later.

bitcartel commented 3 years ago

That worked, thanks for your help!

I see that plonkit looks for contrib/template.sol from the current working directory. Perhaps the template path could be future command-line arg?

lispc commented 3 years ago

That worked, thanks for your help!

I see that plonkit looks for contrib/template.sol from the current working directory. Perhaps the template path could be future command-line arg?

I am considering embedding the contract template into rust source code.