Commit Graph

210 Commits

Author SHA1 Message Date
Jon Cinque 5aa3b98f2c
stake-pool-cli: Add next fees in verbose mode, fix mapping (#2645) 2021-12-16 14:46:01 +01:00
Jon Cinque ba08b6e662
stake-pool: Mint extra reserve lamports as pool tokens on init (#2636)
* stake-pool: Mint extra reserve lamports as pool tokens on init

* Wait more aggressively in py test

* Simplify test
2021-12-14 18:45:15 +01:00
Jon Cinque 9bda73f37c
stake-pool-cli: Add `deposit-all-stake` command (#2614)
* stake-pool-cli: Add `deposit-all-stake` command

* Improve py test
2021-12-14 02:25:37 +01:00
Jon Cinque d5ac6b883b
stake-pool-py: Add simple rebalance bot (#2630)
* stake-pool-py: Add simple rebalance bot

* Fixup test

* Refactor flaky tests

* Create vote earlier in test

* Duplicate create_vote call causes stall

* Wait more aggressively
2021-12-13 13:17:07 +01:00
Michael Vines 1a0155e34b Update to Rust 1.57.0 2021-12-09 23:56:47 -08:00
Jon Cinque a7888861da
stake-pool-py: Create and deserialize stake pools (#2557)
* stake-pool-py: Create and deserialize stake pools with CI

* Add ability to add / remove validators

* Add vote init instruction for cleaner tests

* Fixup CI

* Add deposit / withdraw sol

* Add update instructions

* Add increase / decrease stake

* Add deposit / withdraw stake
2021-12-10 00:43:25 +01:00
Jon Cinque c24bc966f1
stake-pool-cli: Update input parser to work with ledgers (#2613)
* stake-pool-cli: Update input parser to work with ledgers

* fmt
2021-12-03 01:55:18 +01:00
Jon Cinque 688ee423ed
stake-pool-cli: Fix vote account address in details (#2585) 2021-11-16 21:30:10 +01:00
JulI0-concerto cd63580b79
Implement multiple output format for spl-stake-pool list-all (#2558)
* Implement json output formats for spl-stake-pool list-all

* Implement --output json or json-compact or display in list-all cmd

* cleanup: use destructuring instead of tuple

* Fix related to PR comments

* Add json and json-compact output for list command

* implement list command display with Display and VerboseDisplay

* make CliStakePool->details optional

* cleanup use

* Update stake-pool/cli/src/main.rs

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* Update stake-pool/cli/src/main.rs

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* clippished

* fix use

* fix fmt issue

Co-authored-by: Julien Piccaluga <julien.piccaluga@kudelskisecurity.com>
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-11-10 13:06:14 -07:00
Jon Cinque 75ddd9bb22
stake-pool-docs: Rearrange docs, add quickstart guide (#2561)
* stake-pool-docs: Rearrange docs, add quickstart guide

* Rearrange doc sidebar
2021-11-06 12:48:11 +00:00
Jon Cinque 8aef395901
stake-pool: Bump CLI and program version to 0.6.3 (#2555) 2021-11-02 22:15:33 +01:00
Jon Cinque 01765b9953
stake-pool: Reduce wait for active stake merges (#2553)
* stake-pool: Reduce wait to one epoch for active merges

* Remove stake_program references

* Remove credits observed point from docs
2021-11-01 15:14:49 +01:00
Alexander Ray 287c3bedaf
stake-pool-cli: Fix prepare_withdraw_accounts issues (#2548)
* - fix prepare_withdraw_accounts issues

* - use reverse fee as workaround for withdraw issue
2021-10-26 23:13:59 +02:00
Jon Cinque cd3f5ae9fe
stake-pool: Add test for withdrawing all, with fee (#2550) 2021-10-26 22:50:16 +02:00
Jon Cinque 8be3ba819c
stake-pool-docs: Add the published audits (#2546) 2021-10-26 22:30:16 +02:00
Jon Cinque 756696ee8e
stake-pool-cli: Add validator list argument to create (#2545)
People want to know more about the validator list, but there isn't too
much info provided.

* Include the validator list as an optional parameter to pool creation
* Print out the address during creation
* Always print out the address during `list`
* Add docs about it
2021-10-25 23:13:58 +02:00
Michael Vines fca9836a2c Avoid MemcmpEncodedBytes::Binary 2021-10-20 22:52:19 -07:00
Michael Vines 9acb082dc3 Upgrade to Solana v1.8.1 2021-10-20 22:52:19 -07:00
Jon Cinque 4ab60e6794
stake-pool: Also set the sol deposit authority on init (#2532) 2021-10-20 01:45:00 +02:00
Jon Cinque 675d65b965
stake-pool-cli: Add more docs around scripts (#2531) 2021-10-20 01:29:00 +02:00
Jon Cinque 203db7bc3f
stake-pool-cli: Improve deposit and withdraw UX (#2530) 2021-10-19 23:30:41 +02:00
Jon Cinque c5e7ae736e
stake-pool: Add comment to validator stake info field (#2527) 2021-10-19 17:19:10 +02:00
Jon Cinque 1a48523a80
stake-pool: Remove copied stake program code (mostly) (#2526)
* stake-pool: Remove (mostly) the copied stake program

* Remove references to stake_program in CLI
2021-10-19 16:48:56 +02:00
Jon Cinque f95e390dd4
stake-pool: Clarify stake deposit fee (#2520) 2021-10-19 12:26:50 +02:00
Jon Cinque 3b48fa09d3
stake-pool: Cleanup documentation in code (#2525) 2021-10-19 01:50:35 +02:00
Jon Cinque 4658815e9f
stake-pool: Force pools to only use the SPL token program (#2521) 2021-10-19 01:39:57 +02:00
Jon Cinque 7f0278caa8
stake-pool: Add checked math to big vec calc (#2524) 2021-10-19 00:46:49 +02:00
Jon Cinque f97c61a9ed
stake-pool: Initialize all pool fields explicitly (#2523) 2021-10-19 00:46:39 +02:00
Jon Cinque 50b5597fcf
stake-pool: Improve error when overdrawing on decrease (#2522) 2021-10-19 00:45:46 +02:00
Alexander Ray 671590dd05
- reimplement prepare_withdraw_accounts according to the documentation (#2513)
* - reimplement prepare_withdraw_accounts according to the docu

* - add preferred withdraw validator

* - fix clippy issues

* - fix styling
2021-10-15 22:35:44 +02:00
Michael Vines 12732f8d5a Upgrade to Solana 1.8.0 2021-10-12 09:40:06 -07:00
Jon Cinque b8cc6fa12c
stake-pool-cli: Fix funding authority flag name (#2500) 2021-10-12 00:04:35 -04:00
Jon Cinque 13375afff2
stake-pool: Add last epoch values for APR calculation (#2491)
* stake-pool: Add last epoch values for APR calculation

* Bump versions for release
2021-10-07 00:01:15 -04:00
Jon Cinque 3d52925865
stake-pool: Bump version for 0.6.0 release (#2487) 2021-10-06 00:11:20 -04:00
Jon Cinque b80c10f406
stake-pool: Add withdraw-sol command + CLI + docs (#2475)
* stake-pool: plumb sol withdraw fee and authority

* Add sol withdraw instruction and processor

* Cleanup sysvar usage

* Fix stack size violation

* Add tests

* Add CLI support

* Add docs for new command

* Integrate review feedback
2021-10-05 22:44:03 -04:00
Jon Cinque 5337a4f17f
stake-pool: Use `matches!` to allow for fix in underlying error (#2453) 2021-09-26 23:58:30 +02:00
Jon Cinque 006c410534
stake-pool-cli: Update minimum balance to be correct (#2449) 2021-09-24 01:46:37 +02:00
Jon Cinque d8b8aae4f5
stake-pool: Update docs and help messages (#2435)
* stake-pool: Update docs and help messages

* Integrate review feedback
2021-09-23 23:42:25 +02:00
Alexander Ray 11a36d9bd1
- fix "attempt to subtract with overflow" issue (#2445)
* - fix "attempt to subtract with overflow" issue

* Update stake-pool/cli/src/main.rs

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>

* Update stake-pool/cli/src/main.rs

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>

* - run cargo fmt on it

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2021-09-22 21:53:32 +02:00
dependabot[bot] a036953d12
build(deps): bump serde_json from 1.0.67 to 1.0.68 (#2416)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.67 to 1.0.68.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.67...v1.0.68)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-15 11:17:56 +00:00
Han Yang 30406eea40
stake-pool: cli fix remove-vsa bug (#2404)
* fix remove-vsa bug: join instructions

* missed &

* pls squash this merge
2021-09-13 14:39:22 +02:00
Jon Cinque 864b7eff0b
stake-pool-cli: Fix sol deposit for private pool (#2399)
* stake-pool-cli: Fix sol deposit for private pool

* cargo fmt
2021-09-10 01:27:43 +02:00
Jon Cinque 562fd6d97f
stake-pool: Bump versions and update id for deployment (#2384) 2021-09-08 13:00:32 +02:00
Jon Cinque 87a5c79347
stake-pool: Reduce minimum stake per validator to 0.001 SOL (#2373)
* stake-pool: Reduce minimum stake per validator to 0.01 SOL

* Lower the limit to 0.001 SOL
2021-09-08 02:10:31 +02:00
Jon Cinque 87b74cfa4c
stake-pool: Combine create stake and add validator (#2371) 2021-09-03 00:54:51 +02:00
Jon Cinque fc0d6a2db7
stake-pool: Split from stake account during removal (#2367)
If the stake pool gives over the validator stake account to the staker,
they may keep it and make it impossible to re-add that validator in the
future.

Split the whole amount into a new stake account on removal.
2021-09-02 01:38:16 +02:00
dependabot[bot] 3fcfb999d1
build(deps): bump serde from 1.0.129 to 1.0.130 (#2361)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.129 to 1.0.130.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.129...v1.0.130)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-31 11:13:17 +00:00
Michael Vines 4406265d4a Upgrade to Solana 1.7.11 2021-08-30 12:41:08 -07:00
dependabot[bot] 7ef3509f51
build(deps): bump serde_json from 1.0.66 to 1.0.67 (#2351)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.66 to 1.0.67.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.66...v1.0.67)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-30 11:32:19 +00:00
dependabot[bot] 1f97833cdd
build(deps): bump serde from 1.0.128 to 1.0.129 (#2322)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.128 to 1.0.129.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.128...v1.0.129)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-24 11:17:42 +00:00