Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix Solana error MergeTransientStake
When there is a big amount in a reserve account Solana can't activate it in a single shot. It activates it in several epochs. When reserve SOLs are sent to stake accounts those stake accounts are still not fully activated after current epoch. But if Solido creates a new stake account in next epoch (e.g. I make a new deposit) then at the end of epoch it tries to merger these two account and gets Solana error "stake account with transient stake cannot be merged". We can't merge non fully activated stake account from different activation epochs. Same error is reproduced in Solido v2. If there is lots of SOL in a reserve account (currently we have ~4_000_000 SOL on mainnet) then after migrate to v2 instruction it stakes from reserve and stake is activated partially. And if I try to deposit e.g. 10 SOL, then another stake account is created and merging those two account fails at epoch end. Guess the same error will happen on v1 if I remove all validators and then add a new one. There should be at least 600_000 SOL in the reserve for the error to happen. On local validator Solana activates max 250_000 SOL per epoch.
- Loading branch information