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-cli] sequentially process confidential transfer withdraw in token-cli #5674

Conversation

samkim-crypto
Copy link
Contributor

@samkim-crypto samkim-crypto commented Oct 27, 2023

Problem

We can't do confidential token withdrawal through the cli due to the transaction size limit

Summary of changes

Divide up the process of creating proof context states and the actual token withdraw.

@samkim-crypto samkim-crypto added the WIP Work in progress label Oct 27, 2023
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.

Great work! Just one suggestion to speed up the withdrawal to go down to 3 dependent transactions instead of 4

Comment on lines +3444 to +3453
// close context state account
let context_state_authority_pubkey = context_state_authority.pubkey();
let close_context_state_signers = &[context_state_authority];
token
.confidential_transfer_close_context_state(
&context_state_pubkey,
&token_account_address,
&context_state_authority_pubkey,
close_context_state_signers,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to do the withdraw and close in the same transaction? If so, it would be good to do it in this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, good idea!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added issue #5685, which will be addressed in a follow-up PR.

@samkim-crypto samkim-crypto removed the WIP Work in progress label Oct 27, 2023
@samkim-crypto samkim-crypto merged commit 98aa8aa into solana-labs:master Oct 27, 2023
31 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