Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZkProgram needs more docs, it is only mentioned in the context of recursion #548

Open
mitschabaude opened this issue Jul 31, 2023 · 4 comments
Labels
docs Improvements or additions to documentation

Comments

@mitschabaude
Copy link
Contributor

mitschabaude commented Jul 31, 2023

ZkProgram is the o1js general-purpose API for creating zk proofs. It's relevant for anyone who wants to create a proof that's not a Mina smart contract proof.

The docs don't present ZkProgram as such, but only present it as a tool "for recursion". It's true that you need offchain proofs in order to use recursion, but it's not true that recursion is the only use case for offchain proofs.

Idea: Create a new fleshed out section for writing provable code, which is not specific to smart contracts. This section can cover other topics not currently covered, such as Provable.witness() or "common differences between provable code and normal code". ZkProgram, as the general-purpose way of creating proofs, would fit well near the end of such a section

zkProgram - the verification key is a unique "description" of the circuit (^= the program)

@barriebyron barriebyron changed the title ZkProgram is only mentioned in the context of recursion ZkProgram needs more docs, it is only mentioned in the context of recursion Aug 15, 2023
@barriebyron barriebyron added the docs Improvements or additions to documentation label Aug 15, 2023
@iregina
Copy link
Contributor

iregina commented Nov 1, 2023

@mitschabaude - do you mind elaborating on why you said "writing provable code, which is not specific to smart contracts" --> maybe, what is provable code?

And what did you mean by: "zkProgram - the verification key is a unique "description" of the circuit (^= the program)"

@mitschabaude
Copy link
Contributor Author

do you mind elaborating on why you said "writing provable code, which is not specific to smart contracts" --> maybe, what is provable code?

yeah sure! this is out of context, I wrote

Create a new fleshed out section for writing provable code, which is not specific to smart contracts

so the new section is what I don't want to be specific to smart contracts. Provable code is any code you can create a zk proof of! Also called a circuit (but that's jargon-y). So, a section about writing circuits!

And what did you mean by: "zkProgram - the verification key is a unique "description" of the circuit (^= the program)"

That doesn't look like something I wrote, maybe @barriebyron added it to my description O.o

@barriebyron
Copy link
Contributor

yes please more code for ZkProgram and maybe mention examples, like https://github.com/o1-labs/o1js/blob/ef0d5e4497938cf9d3c8cb8eb179d58149e2bc25/src/examples/gadgets.ts

@barriebyron
Copy link
Contributor

@garwalsh likes the idea of a more complete and standalone doc for ZkProgram

@garwalsh garwalsh added to-burn and removed to-burn labels Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants