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

[docs] Add zk token proof program description #32011

Merged
merged 9 commits into from
Jun 13, 2023
Merged

[docs] Add zk token proof program description #32011

merged 9 commits into from
Jun 13, 2023

Conversation

samkim-crypto
Copy link
Contributor

Problem

The docs do not yet contain documentation on the native zk token proof program.

Summary of Changes

Add the zk token proof program description.

The notes on range proofs, group ciphertext validity proofs, and transfer proofs will be added in follow-up PRs.

Fixes #

@samkim-crypto
Copy link
Contributor Author

@mvines, @CriesofCarrots, @nickfrosty, I wrote some docs for the zk-token proof program. If you have any cycles to sanity check what I wrote (non-latex part), then that would be really great 🙏! I can also move the docs to somewhere else that may be more appropriate.

Comment on lines 17 to 19
- Status: The program is in active development and is not yet available. Please
follow the feature gate `zk1snxsc6Fh3wsGNbbHAJNHiJoYgF29mMnTSusGx5EJ` for
updates.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming we don't backport this documentation to v1.16 it seems fine to remove this status information entirely, so we don't need to remember to update it later. This PR then ships in v1.17 and by that time the program should have been activated on mainnet

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, sounds good!

docs/src/developing/runtime-facilities/zk-token-proof.md Outdated Show resolved Hide resolved
docs/src/developing/runtime-facilities/zk-token-proof.md Outdated Show resolved Hide resolved
docs/src/developing/runtime-facilities/zk-token-proof.md Outdated Show resolved Hide resolved
docs/src/developing/runtime-facilities/zk-token-proof.md Outdated Show resolved Hide resolved
@samkim-crypto samkim-crypto requested a review from mvines June 9, 2023 01:43
Copy link
Contributor

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple nits that I missed on the first pass, and one question.

docs/src/developing/runtime-facilities/zk-token-proof.md Outdated Show resolved Hide resolved
The simplest way to use a proof instruction is to execute it without producing a
context state account. In this case, the proof instruction can be included as
part of a larger Solana transaction that contains instructions of other Solana
programs. Programs such as the SPL Token 2022 program should directly access the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to call out SPL Token 2022 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, yeah I guess it is not necessary.

In general, I mention Token 2022 in the doc because:

  1. It explains the specific choice of instructions in the proof program
  2. People can perhaps look at Token 2022 to see an example of how proof program can be used

Here, I was intending the effect of (2), but perhaps we can remove the Token 2022 in this sentence and then we can mention to refer to Token 2022 for examples on how proof program can be used somewhere in the doc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I removed mentioning of Token 2022 here. I had a couple of applications like these solana-labs/solana-program-library#3984 in mind that would need to use the proof program. Perhaps we can update doc with pointers to examples that include Token-2022 and some of these applications once they are complete.

docs/src/developing/runtime-facilities/zk-token-proof.md Outdated Show resolved Hide resolved
@samkim-crypto samkim-crypto merged commit 57a89a7 into solana-labs:master Jun 13, 2023
jeffwashington pushed a commit to HaoranYi/solana that referenced this pull request Jun 13, 2023
wen-coding pushed a commit to wen-coding/solana that referenced this pull request Aug 15, 2023
wen-coding pushed a commit to wen-coding/solana that referenced this pull request Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants