solana-program-library
solana-program-library copied to clipboard
[token-cli] Reduce number of transactions for confidential transfer withdraw
Problem
The withdraw-confidential-tokens
command is currently executed in a sequence of 4 transactions:
- system instruction to create the proof context account
- verify and store the proof context account
- execute the withdraw
- close the proof context account
Due to the transaction size limit, steps 1 and 2 must be independent transactions. However, steps 3 and 4 can still be executed in a single transaction.
Proposed solution
Update the token-client to merge the instructions in steps 3 and 4. This change should also be applied for other instructions that uses proof context such as ConfigureAccount
.