GuildOfWeavers / distaff

Zero-knowledge virtual machine written in Rust
MIT License
244 stars 44 forks source link

Consider getting inspiration from ZKVM #7

Open gakonst opened 4 years ago

gakonst commented 4 years ago

This is great work! Do consider taking inspiration from ZkVM, since it implements a nice Bitcoin Script-like language (w/ bulletproofs as the proof system). You might get some nice ideas about the lang design from there https://github.com/stellar/slingshot/tree/main/zkvm

bobbinth commented 4 years ago

Thank you! That's a very cool project - will definitely go there for inspiration from time to time.

Federico2014 commented 4 years ago

Thank you! That's a very cool project - will definitely go there for inspiration from time to time.

You are also doing a great project. I have a question. The sentence "A way to specify secret inputs which can change between program executions is not yet available, but will be provided in the future." , do it means the project doesn't support the secret inputs at present, so it is not zero-knowledge?

bobbinth commented 4 years ago

Thank you! You could provide secret inputs using a PUSH operation - but these inputs then become a part of the program - so, that's very limiting, and is definitely not the intent of how it should work.

In the future, you'll be able to provide a list of secret inputs, and there will be another operation (something like READ or maybe a different name). Every time READ is executed, it will take a value from the input list and push it onto the stack.

Federico2014 commented 4 years ago

Thank you very much for your reply. I really expect it. I wonder is it a general-purpose VM for arbitrary zero-knowledge implementation? Then many privacy-related problems on the blockchain can be solved by it. I feel it is will be very powerful

bobbinth commented 4 years ago

@Federico2014 I've just released a new version of the VM. It now has full support for unlimited number of secret inputs (as well as many other nice things) :)