-
Notifications
You must be signed in to change notification settings - Fork 6
Add SPL rebalance admin instructions with bug fixes and tests #311
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
disable forest
Disable forest fix
Add three new admin-only program instructions for migrating funds from SPL stake pool to Marinade liquidity pool: - move_spl_liquid_to_marinade: Withdraw SOL from SPL pool reserve and add directly to Marinade liquidity pool - create_spl_stake_account: Create a stake account from SPL pool and deactivate it (uses PDA for discoverability) - deposit_spl_stake_to_liquid: Deposit fully deactivated stake account to Marinade liquidity pool Also adds: - Client SDK methods for all three instructions - findSplRebalanceStakeAccounts() method for stake account discovery - Admin scripts for executing the operations and reporting - Reverts UI withdrawals to use Marinade (admin instructions handle SPL pool migration instead of user-initiated withdrawals)
- Fix critical bug: WithdrawStake discriminator was 12 (SetFee), now 10 - Fix account count: WithdrawStake requires 13 accounts, not 12 - Fix validator list parsing in blaze.ts to use correct 73-byte layout - Add Rust unit tests for create_spl_stake_account (7 tests) - Add Rust unit tests for deposit_spl_stake_to_liquid (5 tests) - Add Rust unit tests for spl.rs pool token math (16 tests) - Add TypeScript unit tests for blaze.ts validator parsing (12 tests) - Add spl-rebalance-liquid-transfer scenario test - Add inspectBlaze.ts script for debugging stake pool state - Add admin fixtures for scenario tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Run cargo fmt on Rust files - Use JSON import in tests instead of fs.readFileSync - Exclude __tests__ from tsconfig (run separately by mocha) - Add __tests__ to eslint ignorePatterns - Fix unused import and type annotation in blaze.ts Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Key Changes
Bug Fixes (Critical)
New Instructions
moveSplLiquidToMarinade- Direct liquid transfer from SPL pool to Marinade LPcreateSplStakeAccount- Withdraw stake from SPL pool and deactivatedepositSplStakeToLiquid- Deposit deactivated stake to Marinade LPTests Added