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

[program-2022] Add functions to generate mint/burn proofs from account info #7575

Merged

Conversation

samkim-crypto
Copy link
Contributor

@samkim-crypto samkim-crypto commented Dec 11, 2024

Problem

The confidential mint/burn extension and the confidential transfer extension have some inconsistent ways of generating proofs from account data.

Summary of Changes

6b073ce: All proof data types (TransferProofData, TransferWithFeeProofData, BurnProofData, ...) just contains the proof components while the MintProofData contains the new decryptable supply component. The decryptable supply ciphertext could be generated together with the proofs, but I think it is slightly more natural to generate it separately from account data like in the other confidential transfer instructions. In this commit, I removed the decryptable supply component from MintProofData. Sorry I should have noticed this before in the review 🙏 for #7319.

9c80b2c: Added functions to generate mint and burn proof data from account infos. This would simplify the client for confidential mint and burn.

19b7525: The order of the parameters of type ElGamalKeypair and AeKey are inconsistent between the account info functions of confidential transfer and confidential mint/burn, so I switched these. I also renamed decrypt_current_supply with decrypted_current_supply to be consistent with decrypt_current_balance of confidential transfer.

I apologize for the breaking changes, but I think this should really do it for the program 🙏 .

@samkim-crypto samkim-crypto marked this pull request as ready for review December 11, 2024 12:11
Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Looks good, just the nit to resolve

@samkim-crypto samkim-crypto merged commit 5380b0e into solana-labs:master Dec 11, 2024
35 checks passed
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.

2 participants