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

[token-2022] allow split confidential transfer instruction constructors to be invoked on chain #6178

Merged

Conversation

samkim-crypto
Copy link
Contributor

@samkim-crypto samkim-crypto commented Jan 25, 2024

Problem

The constructors for the split confidential transfer and confidential transfer with fee instructions do not require proofs to be generated and only require context state accounts. However, these functions are labeled to target only offline usage.

Summary of changes

Remove the restriction on the target build for these functions.

@samkim-crypto samkim-crypto added the WIP Work in progress label Jan 25, 2024
@samkim-crypto samkim-crypto removed the WIP Work in progress label Jan 25, 2024
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! I took a look through the rest of the file, and is there a reason for any of the instruction creators be gated on not(target_os = "solana")? Since none of them are performing any encryption or decryption (that I can see at least), they all seem safe.

Some of them call into the verify_* on the proof program, which will fail, but we could likely relax that restriction in the future. What do you think?

@samkim-crypto
Copy link
Contributor Author

Looks good! I took a look through the rest of the file, and is there a reason for any of the instruction creators be gated on not(target_os = "solana")? Since none of them are performing any encryption or decryption (that I can see at least), they all seem safe.

Some of them call into the verify_* on the proof program, which will fail, but we could likely relax that restriction in the future. What do you think?

Oh yes, you are right. All of them take in the proof data as input; the proof is not generated inside those functions. It seems like we can remove it. Let me merge this PR and then do it in a follow-up since there might be something that we are overlooking.

@samkim-crypto samkim-crypto merged commit f9f8824 into solana-labs:master Jan 26, 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