feat: added solana manual withdrawal cli doc#819
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new operational guide to the docs explaining how to perform a manual stSOL withdrawal on Solana using the Solido CLI, including environment setup, transferring stSOL to a local keypair, running the withdrawal, and withdrawing SOL from the resulting stake account.
Changes:
- Added a step-by-step Solana manual withdrawal CLI guide.
- Documented environment setup (Rust, Solana CLI, Solido build) and a maintenance workaround for outdated exchange rate.
- Added instructions for stake deactivation and final SOL withdrawal back to a main account.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| solana withdraw-stake **STAKE_ACCOUNT_PUBKEY** \ | ||
| **MAIN_ACCOUNT_PUBKEY** SOL_AMOUNT \ | ||
| --keypair **KEYPAIR_FILE** |
There was a problem hiding this comment.
In the final solana withdraw-stake example, the placeholders are wrapped in **...** inside a fenced bash block; markdown emphasis isn’t rendered in code fences, so users will literally copy the asterisks and the command will fail. Remove the ** formatting from the code block placeholders.
| solana withdraw-stake **STAKE_ACCOUNT_PUBKEY** \ | |
| **MAIN_ACCOUNT_PUBKEY** SOL_AMOUNT \ | |
| --keypair **KEYPAIR_FILE** | |
| solana withdraw-stake STAKE_ACCOUNT_PUBKEY \ | |
| MAIN_ACCOUNT_PUBKEY SOL_AMOUNT \ | |
| --keypair KEYPAIR_FILE |
| 1. **Execute the withdrawal** to your stake account: | ||
|
|
||
| ```bash | ||
| ./target/release/solido --config ./solido_config.json --keypair-path KEYPAIR_FILE withdraw --amount-st-sol STSOL_AMOUNT | ||
| ``` |
There was a problem hiding this comment.
The guide references solido_config.json but doesn’t explain where to get it (example file, how to generate it, or which fields must be set for mainnet). Without that, the copy/paste commands in section 3 aren’t reproducible.
| @@ -0,0 +1,139 @@ | |||
| # Solana manual withdraw with CLI | |||
There was a problem hiding this comment.
The title uses "manual withdraw"; in English this should be "manual withdrawal" (noun) to match the rest of the doc/CLI terminology.
| # Solana manual withdraw with CLI | |
| # Solana manual withdrawal with CLI |
| ```bash | ||
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | ||
| source "$HOME/.cargo/env" | ||
| rustup override set 1.60.0 | ||
| ``` |
There was a problem hiding this comment.
rustup override set 1.60.0 applies to the current directory; in these instructions it likely runs outside the cloned solido_v2 folder, so it won't reliably pin the toolchain for the build (and may set an override in the wrong place). Move the override step to after cd solido_v2 (or use rustup toolchain install 1.60.0 + a per-project override).
| git clone --recurse-submodules -b V2.1 https://github.com/lidofinance/solido solido_v2 | ||
| cd solido_v2 |
There was a problem hiding this comment.
This section says to install "Solido CLI v2.1.0", but the clone command checks out -b V2.1 (a branch) rather than the v2.1.0 tag. Pin the git checkout to the exact release tag/commit referenced above to make the instructions reproducible.
| git clone --recurse-submodules -b V2.1 https://github.com/lidofinance/solido solido_v2 | |
| cd solido_v2 | |
| git clone --recurse-submodules https://github.com/lidofinance/solido solido_v2 | |
| cd solido_v2 | |
| git checkout v2.1.0 |
| ./target/release/solido --config ./solido_config.json --keypair-path KEYPAIR_FILE withdraw --amount-st-sol STSOL_AMOUNT | ||
| ``` | ||
|
|
||
| ⚠️ **Note**: if you're seeing the following error: |
There was a problem hiding this comment.
Minor grammar: capitalize "If" after "
| ⚠️ **Note**: if you're seeing the following error: | |
| ⚠️ **Note**: If you're seeing the following error: |
| Program log: The exchange rate is outdated, it was last computed in epoch 644, but now it is epoch 646. | ||
| ``` | ||
|
|
||
| Execute the following command to update the exchange rate |
There was a problem hiding this comment.
Add punctuation here (colon or period). As written, "Execute the following command to update the exchange rate" reads like an unfinished sentence.
| Execute the following command to update the exchange rate | |
| Execute the following command to update the exchange rate: |
| Execute the following command to update the exchange rate | ||
|
|
||
| ```bash | ||
| ./target/release/solido --config solido_config.json --keypair-path KEYPAIR_FILE perform-maintenance |
There was a problem hiding this comment.
--config path is inconsistent across examples (here it uses solido_config.json, while the earlier withdraw command uses ./solido_config.json). Pick one form and use it consistently so users can copy/paste without guessing the config location.
| ./target/release/solido --config solido_config.json --keypair-path KEYPAIR_FILE perform-maintenance | |
| ./target/release/solido --config ./solido_config.json --keypair-path KEYPAIR_FILE perform-maintenance |
Please, go through these steps before you request a review:
📝 Describe your changes
🔎 Attach a source of truth or evidence that allows reviewers to confirm the changes independently