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

[rust-legacy-client] Add confidential mint burn extension #168

Merged

Conversation

samkim-crypto
Copy link
Contributor

@samkim-crypto samkim-crypto commented Feb 4, 2025

Problem

There is no support for the confidential mint burn extension in the rust-legacy client.

Summary of Changes

Added support for the confidential mint burn in the rust-legacy client:
329676c: Made a couple of relatively small changes in the account info interface:

  • When generating the proof needed to rotate ElGamal public key, the new ElGamal keypair is not actually needed for the proof generation. So I fixed this.
  • When generating the proof needed for confidential mint, the proof constructor takes in the current supply amount. I updated this so that it takes in a aes key instead, which can be used to decrypt the current supply. This interface seemed more natural and simpler by the consumers of this function.
  • I added the new_decryptable_balance to simplify the rust client a bit.

d5a9575: Added support for the confidential mint and burn in the rust client. I don't think there is anything specifically notable here other than the fact that it is verbose as always to account for all the different variations of how proofs can be provided.

3c9a62b: Added tests rust-client. Nothing notable here either. The logic is in-line with the tests for the confidential transfer and confidential fee extensions.

There is an interface change, so the semver check does seem to complain. Other than that, the rest of the CI checks seem to pass.

@samkim-crypto samkim-crypto marked this pull request as ready for review February 5, 2025 02:49
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.

Straightforward and makes sense!

@samkim-crypto samkim-crypto merged commit 2e799e3 into solana-program:main Feb 7, 2025
19 of 20 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