-
Notifications
You must be signed in to change notification settings - Fork 23
feat: persist all accounts #648
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
Conversation
Manual Deploy AvailableYou can trigger a manual deploy of this PR branch to testnet: Alternative: Comment
Comment updated automatically when the PR is synchronized. |
WalkthroughThe Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related issues
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 (1)
🧰 Additional context used🧠 Learnings (4)📓 Common learnings📚 Learning: 2025-11-19T09:34:37.890ZApplied to files:
📚 Learning: 2025-10-21T14:00:54.642ZApplied to files:
📚 Learning: 2025-11-07T13:20:13.793ZApplied to files:
🧬 Code graph analysis (1)magicblock-chainlink/src/chainlink/mod.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). (3)
🔇 Additional comments (3)
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
configs/ephem-devnet.toml(1 hunks)magicblock-chainlink/src/chainlink/mod.rs(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: bmuddha
Repo: magicblock-labs/magicblock-validator PR: 578
File: magicblock-aperture/src/requests/websocket/account_subscribe.rs:18-27
Timestamp: 2025-10-21T14:00:54.642Z
Learning: In magicblock-aperture account_subscribe handler (src/requests/websocket/account_subscribe.rs), the RpcAccountInfoConfig fields data_slice, commitment, and min_context_slot are currently ignored—only encoding is applied. This is tracked as technical debt in issue #579: https://github.com/magicblock-labs/magicblock-validator/issues/579
📚 Learning: 2025-11-19T09:34:37.890Z
Learnt from: thlorenz
Repo: magicblock-labs/magicblock-validator PR: 621
File: test-integration/test-chainlink/tests/ix_remote_account_provider.rs:62-63
Timestamp: 2025-11-19T09:34:37.890Z
Learning: In test-integration/test-chainlink/tests/ix_remote_account_provider.rs and similar test files, the `_fwd_rx` receiver returned by `init_remote_account_provider()` is intentionally kept alive (but unused) to prevent "receiver dropped" errors on the sender side. The pattern `let (remote_account_provider, _fwd_rx) = init_remote_account_provider().await;` should NOT be changed to `let (remote_account_provider, _) = ...` because dropping the receiver would cause send() operations to fail.
Applied to files:
magicblock-chainlink/src/chainlink/mod.rs
🧬 Code graph analysis (1)
magicblock-chainlink/src/chainlink/mod.rs (2)
magicblock-processor/tests/fees.rs (1)
ephemeral_balance_pda_from_payer(20-26)magicblock-chainlink/src/remote_account_provider/remote_account.rs (1)
lamports(79-85)
⏰ 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). (3)
- GitHub Check: run_make_ci_test
- GitHub Check: run_make_ci_lint
- GitHub Check: Build Project
🔇 Additional comments (4)
magicblock-chainlink/src/chainlink/mod.rs (3)
247-251: LGTM: Cleaner escrow cloning logic.The simplified condition using
is_none_orclearly expresses when escrow cloning is needed: when the feepayer doesn't exist in the bank or when it exists but isn't delegated. This is more readable than the previous approach.
269-293: LGTM: Auto-airdrop logic preserved correctly.The auto-airdrop flow is well-structured and correctly positioned after account provisioning:
- Checks if auto-airdrop is configured
- Retrieves current feepayer lamports from the bank
- Performs best-effort airdrop if the balance is zero
- Logs errors without failing the operation
The "best-effort" approach with non-blocking error handling is appropriate for this feature.
254-258: No issues found; implementation is correct.The function call properly uses the correct signature (2 parameters) and index value:
ephemeral_balance_pda_from_payer(feepayer, 0)correctly derives the balance PDA with index 0 (for feepayer), which aligns with codebase patterns where index 0 represents the feepayer's balance PDA and higher indices (e.g., 1/ACTOR_ESCROW_INDEX) represent delegated actor escrows.configs/ephem-devnet.toml (1)
2-2: No issues found. Configuration is properly handled.Verification confirms:
- ✓ RPC endpoint
https://rpc.magicblock.app/devnetis accessible and responds correctly to RPC calls- ✓ Custom cluster types are properly handled throughout the codebase via
RemoteClusterenum variants andremote_cluster_from_remote()conversion function- ✓ Endpoint provides expected devnet-compatible behavior (responds to standard Solana RPC methods)
The configuration change integrates correctly with existing cluster type handling logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* master: feat: persist all accounts (#648)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Simplified transaction fee handling logic to improve reliability and code maintainability. * Enhanced account management for automatic airdrop functionality with updated processing order. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Simplified transaction fee handling logic to improve reliability and code maintainability. * Enhanced account management for automatic airdrop functionality with updated processing order. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
* master: feat: use latest svm version (#657) chore: update solana account (#660) fix: better transaction diagnostics & rent exemption check (#642) chore: add access-control-max-age header to cors (#654) fix(aperture): prevent racy getLatestBlockhash (#649) fix: await until sub is established and perform them in parallel (#650) feat: persist all accounts (#648)

Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.