* lending: Update JS tests to solana-test-validator
* Add solana tools install
* Fix oopsie on the path
* Move where deployed programs go
* stake-pool: Add borsh support and size on creation
We can't specify the size in the instruction unfortunately, since we'd
only have 10kb max for the validator list. At roughly 50 bytes per
validator, that only gives us 200 validators.
On the flip side, using Borsh means we can allow the validator stake list
to be any size!
* Add AccountType enum
* Remove V1 everywhere
* Add max validators as parameter and get_instance_packed_len
* Add test for adding too many validators
* Clippy
* stake-pool: Use checked_ceil_div for withdraw calc
When a stake account is totally removed from a stake pool by the
manager, there's a chance that the operation would not take enough of
the manager's pool tokens by 1 due to truncation.
Do a ceiling division instead, and refactor ceiling division into the
math library.
* Use new function name on CLI
* Cargo fmt
* stake-pool-cli: Fix update command, add verbosity
The update command in the stake pool CLI was passing the validator vote
account instead of the associated stake account from the pool, causing
it to fail. Additionally, add more verbose logging, and a dry-run mode
to get simulate transaction information, useful for debugging CLI
failures.
* Run cargo fmt
* Various postponed fixes and changes to the stake pool program
* Fixed PR comments
* Fixed no-signature validator stake account add test
Co-authored-by: Yuriy Savchenko <yuriy.savchenko@gmail.com>
* Added validator stake account list storage, deprecated old tests
* Added join and leave stake pool instructions, error messages refactoring
* Stake pool tests refactoring, tests for join and leave pool added
* Added validator stake account creation instruction, join/leave pool instructions renamed, version field added
* Formatting fixes
* Added update list/pool instructions (no tests yet), updated deposit instruction logic, claim instruction removed, refactoring
* Updated deposit logic and tests, updated withdraw logic and added tests, refactoring
* Stake pool CLI updated to work with new deposit/withdraw instructions, claim usage removed
* Added validator stake account management and balance update commands to the stake pool CLI, updated dependency versions, updated devnet program address
* Merge conflicts fixed
* Removed deprecated tests
* Fixes for review comments
* Additional program id checks across the code
* Formatting errors fixed
* Changed minimum stake balance in CLI, removed deprecated tests, removed check for stake history id
* Added TODO for stake account warmup status check
* Cargo.lock conflict fix
* Formatting fixed
* Update Cargo lock file for CI
* Pin themis version of subtle
Co-authored-by: Yuriy Savchenko <yuriy.savchenko@gmail.com>
* Added set-staking-auth and set-owner commands to stake pool CLI
* Error handling refactored, fixed new fee owner setting, fixed set owner arg group settings
* Added check for fee account mint to stake pool initialization and set owner methods
* Implemented stake-pool CLI with create-pool, deposit, list and withdraw commands, fixed several bugs in underlying smart contract
* Several typos fixed, some error text clarifications.
* Fee parameter in stake pool creation changed into two: numarator and demoninator
* Refactoring to resolve pool request comments
* Added merge to stake_receiver account when claiming whole stake account
* Removed unused import
* Withdraw bump seed calculation fixed
* Interface accounts added as read-only, fixed mint authority on deposit, fixed stake pool stake deserializing
* Unit test refactoring, added success tests for deposit, updated stake account program id
* Warnings fixed
* Removed random key generation, used Pubkey::new_unique instead
* Imports optimization
* Unit test architecture updated to remove separate invoke_signed declarations
* Added missing accounts (sysvar clock and stake account program id) to calls to stake account program
* Fixed formatting
* Fixed stake pool deposit unit test
* Temporarily removed stake-pool cli from main workspace
* Fixed warning in token program
* Fixed warning in token program v3
* Fixed warnings in token swap program
* Fixed warning in token cli
* Sysvar and program id params reordered