-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes: rebalance decrease amount calculation, validator_lamport_balan…
…ce initialization, tweaks to keeper (#72) Changes: * Fixes rebalance decrease: the stake pool's validator_list lamport amount can get out of alignment with the associated stake account's active lamports, resulting in more lamports being withdrawn from validators than is possible. The problem is fixed by passing along the true active stake amount into the decrease_validator_stake calculation * Unblocks unstaking for stake deposits by fixing how validator_lamport_balances are initialized. Currently, all validator_lamport_balances start at 0, meaning all current lamports are seen as stake deposits and tried to be unstaked until the cap is hit. However, we can load each value in a `rebalance` instruction when there are no activating or deactivating lamports and then continue with the working process. Adds a sentinel value and checks to skip modifying it when sentinel is present. * Will deploy on test program sssh4zkKhX8jXTNQz1xDHyGpygzgu2UhcRcUvZihBjP before deploying on mainnet program
- Loading branch information
Showing
38 changed files
with
714 additions
and
142 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.