feat: add confined flag#23
Conversation
WalkthroughThis PR introduces a new confined flag to the account state system by adding a confined flag index to the bitfield, integrating it into copy-on-write account representations, and exposing public API methods on AccountSharedData to manage and query this flag state. A persistence test verifies the flag lifecycle through serialization cycles. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (2)
🔇 Additional comments (8)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. 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. Comment |
Summary
Add a new
confinedflag to the account type to indicate that an account's usage is limited. When this flag is set, operations like changing lamports or data size are restricted. This complements existing flags likedelegated,compressed, andundelegating.Details
The confined flag is implemented as a new bit in the existing flag structure:
CONFINED_FLAG_INDEXconstant (index 5) in the flag hierarchyset_confined()andconfined()methods onAccountSharedDatato manage the flag stateSummary by CodeRabbit
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.