61d9d219f9
* Withdraw authority no longer implies a custodian Before this change, if the withdraw authority and custodian had the same public key, then a withdraw authority signature would imply a custodian signature and lockup would be not be enforced. After this change, the client's withdraw instruction must explictly reference a custodian account in its optional sixth account argument. Likewise, the fee-payer no longer implies either a withdraw authority or custodian. * Fix test The test was configuring the stake account with the fee-payer as the withdraw authority, but then passing in a different key to the withdraw instruction's withdraw authority parameter. It only worked because the second transaction was signed by the fee-payer. |
||
---|---|---|
.. | ||
src | ||
.gitignore | ||
Cargo.toml | ||
README.md |
README.md
Overview
solana-stake-monitor
is a utility that scans all transactions to ensure that stake accounts remain in compliance with the following rules:
- The stake account must be created after genesis
- The "compliant balance" of a stake account is set upon stake account initialization, system transfers of additional funds into a compliant stake account are excluded from the "compliant balance"
- The stake account cannot have a lockup or custodian
- Withdrawing funds from the stake account trigger non-compliance
- Stake accounts split from a compliant stake account remain compliant, and the "compliant balance" is adjusted accordingly for the original stake account
In terms of solana
command-line subcommands:
create-stake-account
: Creates a compliant stake account provided the--lockup-date
,--lockup-epoch
, or--custodian
options are not specifieddelegate-stake
/deactivate-stake
/stake-authorize
/split-stake
: These commands do not affect compliancewithdraw-stake
/stake-set-lockup
: These commands will cause non-compliancetransfer
: Any additional funds transferred aftercreate-stake-account
are excluded from the "compliant balance"
System accounts can also be manually enrolled with the solana-stake-monitor enroll
subcommand.
An enrolled system account must always maintain a balance greater than the balance it had at enrollment minus 1 SOL.