Skip to content
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

cli: Relax stake split destination check #147

Closed
joncinque opened this issue Mar 8, 2024 · 1 comment
Closed

cli: Relax stake split destination check #147

joncinque opened this issue Mar 8, 2024 · 1 comment
Labels
good first issue Good for newcomers

Comments

@joncinque
Copy link

This is a copy of solana-labs#32735

Problem

In the CLI, process_stake_split checks that the destination stake account doesn't exist, and errors if it does. In most cases, this saves from getting an on-chain error from trying to split into some other account.

https://github.com/solana-labs/solana/blob/849525735f784f8e2e0fca19ba5699aea6b1724e/cli/src/stake.rs#L1884-L1893

However, it's possible to pre-seed some lamports into a system account before splitting into it, to keep the full amount delegated, so this check is needlessly strict.

Proposed Solution

Relax the check by allowing the destination split account to be owned by the system program, with some lamports, and no data. It can error in every other case still.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants