Conversation
WalkthroughA CPI context validation step was added to burn, compress, and transfer operations in the compressed-token program, ensuring certain context flags are not used. Comments clarify why similar checks are omitted from delegation and freeze/thaw operations. Related tests were updated to expect and assert the new error code when the validation fails. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Program
participant CPIContext
User->>Program: Invoke burn/transfer/compress instruction
Program->>CPIContext: Validate CPI context flags
alt Invalid context flags
CPIContext-->>Program: Return CpiContextSetNotUsable error
Program-->>User: Error (CpiContextSetNotUsable)
else Valid or unused context
CPIContext-->>Program: Validation passes
Program->>Program: Continue with operation
Program-->>User: Success
end
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (6)
🧰 Additional context used🧬 Code Graph Analysis (3)programs/compressed-token/src/burn.rs (1)
programs/compressed-token/src/process_compress_spl_token_account.rs (1)
programs/compressed-token/src/lib.rs (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
🔇 Additional comments (9)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
* fix: check cpi context account * fix tests
Summary by CodeRabbit
New Features
Documentation
Tests