Commit Graph

16 Commits

Author SHA1 Message Date
Michael Vines 48ab307cad Reboot program address derivation helpers 2021-03-31 23:57:44 -07:00
Michael Vines 67cb90f39c De-tangle processor/state dependencies 2021-03-31 22:00:20 -07:00
Michael Vines b97849d206 Code cleanup v2 2021-03-31 19:52:17 -07:00
Michael Vines eb1bf2eb44 Code cleanup v0 2021-03-31 12:28:08 -07:00
Jack May f390e12311
Allow for fixed error mappings (#1541) 2021-03-30 17:30:44 -07:00
Jon Cinque 9f38a6f4b2
Rework create validator stake account (#1539) 2021-03-31 00:54:15 +02:00
Jon Cinque 9e4f190633
stake-pool: Rename instructions / structs (#1536)
* stake-pool: Rename instructions / structs

* Cargo fmt

* Fix proptest
2021-03-30 23:54:06 +02:00
Jon Cinque d815ba9b8e
stake-pool: Add borsh support and specify size on creation (#1505)
* 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
2021-03-27 13:42:29 +01:00
Yuriy Savchenko d0bf7157cf
Set staking authority instruction removed (#1469)
* Set staking authority instruction removed

* Fixed fmt errors
2021-03-18 12:21:01 +01:00
Michael Vines 995d4a029f Remove tokio dev-dependency 2021-03-16 18:33:37 -07:00
Jon Cinque d31cd78a54
stake-pool: Validator stake account initialized with 1 SOL (#1305)
* stake-pool: Validator stake account initialized with 1 SOL

A validator stake account only has 1 lamport, which means that it will
gain very few rewards per epoch.  Its credits_observed is not
be reset each epoch, which makes it practically impossible to merge
into.  Get around this by instantiating them with more stake.

* Cargo fmt + fix tests
2021-02-22 23:50:05 +01:00
Atticlab LLC 11df4aa5ec
Various postponed fixes and changes to the stake pool program (#1200)
* 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>
2021-02-10 17:42:28 +01:00
Yuriy Savchenko 13826294ef
Stake pool: test coverage for most of the program errors (#1134)
* Stake pool: test coverage for most of the program errors

* Fixes to stake pool tests PR comments
2021-01-27 23:35:25 +01:00
Jon Cinque 14daf0d370
Stake pool: adding pool balance confirmation (Redo of #960) (#1116)
* 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>
2021-01-21 14:48:46 +01:00
Michael Vines a477895f02 program-test now adds SPL Token automatically 2020-12-03 05:39:55 +00:00
Jon Cinque b9fed1116b
stake-pool: Add end-to-end testing using ProgramTest (#828)
* WIP: stake-pool: Add end-to-end testing using ProgramTest

* Run cargo fmt

* Add deposit test and extra requirements

* Update Cargo.lock after rebuild

* Bring token program sdk version back to 1.4.7
2020-11-13 13:11:39 +01:00