Commit Graph

55 Commits

Author SHA1 Message Date
Rob Walker
bb00904fc8 add rent reserve for bootstrap stakes (#6876)
* genesis investor stakes

* assert rent is sufficient for these bootstrappers
2019-11-12 12:33:40 -08:00
Michael Vines
50a17fc00b Use Slot and Epoch type aliases instead of raw u64 (#6693)
automerge
2019-11-02 00:38:30 -07:00
Rob Walker
bc88180058 stake split (#6402)
* stake split

* stake split
2019-10-31 11:07:27 -07:00
Rob Walker
a587d05098 fix re delegate (#6603) 2019-10-29 14:42:45 -07:00
Rob Walker
41067de5e4 multiple deactivation (#6354) 2019-10-15 12:50:31 -07:00
Justin Starry
6a161c740d Stop activating stake after deactivation (#6351) 2019-10-14 18:40:24 -04:00
Rob Walker
c2ebf466fd reestablish parameter semantics for withdraw (#6330) 2019-10-14 15:02:24 -07:00
Tyera Eulberg
a9276700ea Stake program: reorder withdraw keys to allow to == authorized withdrawer (#6314)
automerge
2019-10-10 14:46:38 -07:00
Tyera Eulberg
79987e788e Remove vote pubkey from deactivate_stake (#6257)
* Remove vote pubkey from deactivate_stake

* Fix test

* Update docs
2019-10-07 16:07:01 -06:00
Michael Vines
c1c7e0ff08 Remove reduntant semicolon 2019-10-03 16:25:00 -07:00
Michael Vines
f9f5bc2eb5 More clippy 2019-10-02 21:21:07 -07:00
Rob Walker
57dc46fcfe staking rewards reinvestment (#6129) 2019-09-26 15:57:18 -07:00
Rob Walker
a964570b1a add authorities to stake init (#6104)
* add authorities to stake init

* fixups

* code review
2019-09-26 13:29:29 -07:00
Justin Starry
94f0c081a6 Fix staker / voter credit redemption (#6074)
* Fix staker / voter credit redemption

* Rename variables
2019-09-24 22:58:31 -04:00
Rob Walker
bd19fe5909 add custodian to stake (#5900)
* add custodian to stake

* nits
2019-09-16 17:47:42 -07:00
Tyera Eulberg
5dceeec1ca Add authorize_staker functionality (#5880)
* Add authorized_staker functionality

* Generalize authorize names; implement for Lockup

* Fix authorize() usage and improve tests
2019-09-12 20:03:28 -06:00
Rob Walker
92d2452f33 redelegate stake (#5868)
* redelegate stake

* boil this down to just delegate(), which can be offered any number of times
2019-09-11 09:48:29 -07:00
Rob Walker
b881029de3 make voter_pubkey a function of epoch (#5830)
* make voter_pubkey a function of epoch

* fixups
2019-09-09 18:17:32 -07:00
Jack May
e8d88f3237 Split SDK's timing.rs (#5823) 2019-09-06 14:30:56 -07:00
Rob Walker
4a20c2aa1b add stake and vote errors (#5814)
* add stake errors

* remove self from type_of

* sheesh

* better

* add stake errors

* update wallet error handling

* fixup
2019-09-06 10:55:03 -07:00
Rob Walker
933e835838 add stake lockup (#5782)
* add stake lockup

* fixup
2019-09-04 13:34:09 -07:00
Rob Walker
626e16a177 moar coverage in stake_state (#5554)
* moar coverage in stake_state

* nits
2019-08-18 15:41:49 -07:00
Rob Walker
814af378a7 stake cooldown (#5553)
* stake cooldown

* fixups

* sheesh
2019-08-17 18:12:30 -07:00
Rob Walker
94f1132fb6 fix single node testnet, remove bootstrap vote (#5534) 2019-08-15 18:58:46 -07:00
Rob Walker
88ea950652 add stake_api config account (#5531) 2019-08-15 14:35:48 -07:00
Rob Walker
07d11be6ab add global stake warmup (#5483)
* add global stake warmup

* integrate stake history into runtime

* fixup core tests

* fixup

* remove existing cooldown tests for now
2019-08-12 20:59:57 -07:00
Rob Walker
07a049aa59 include vote account in deactivate (#5476) 2019-08-09 12:55:21 -07:00
Rob Walker
7a603d72bf disallow withdraw of stake unless deactivated (#5457) 2019-08-07 20:29:22 -07:00
Rob Walker
f7d3f55566 fix epoch_stakes again (#5396) 2019-08-01 14:27:47 -07:00
Rob Walker
9278201198 fix epoch_stakes (#5355)
* fix epoch_stakes

* fix stake_state to use stakers_epoch

* don't allow withdrawal before deactivation
2019-07-31 15:13:26 -07:00
Rob Walker
d2b6c2e0ce syscall work, rename syscall to sysvar, rename current to clock (#5074)
* syscall work, rename syscall to sysvar, rename current to clock

* missed one

* nit
2019-07-12 16:38:15 -07:00
Rob Walker
12ef0c25b5 change vote commission to u8 (from u32) (#4887)
automerge
2019-07-02 14:18:11 -07:00
Pankaj Garg
30592f2b12 Integration tests for stake API (#4811)
* more tests for rewards redemption

* break circular deps

* code review
2019-06-25 23:00:35 -07:00
Rob Walker
70f93cc126 remove mining_pool from stake_state (#4804) 2019-06-24 16:01:02 -07:00
Pankaj Garg
405ca1bcb2 Add instructions and processor for stake deactivation (#4781)
automerge
2019-06-21 23:45:03 -07:00
Pankaj Garg
b7f169e06e Program instruction to withdraw un-staked lamports from stake account (#4780) 2019-06-21 22:28:34 -07:00
Rob Walker
a49f5378e2 rewrite vote credits redemption to eat from rewards_pools on an epoch-sensitive basis (#4775)
* move redemption to rewards pools

* rewrite redemption, touch a few other things

* re-establish test coverage
2019-06-21 20:43:24 -07:00
Rob Walker
1f0f947ed2 add validator rewards pools (#4742)
* add validator rewards pools

* populate rewards syscall
2019-06-20 12:22:29 -07:00
Rob Walker
41fbdc6e08 use stake (#4721) 2019-06-19 11:54:52 -07:00
Rob Walker
0ff9c4cd8e add stake warmup and cool down (#4711) 2019-06-17 19:34:21 -07:00
Rob Walker
4c6a6d63bf add MiningPools, fund validator MiningPools from inflation (#4676)
* add MiningPool fund validator MinigPools from inflation

* fixup

* finish rename of MINIMUM_SLOT_LENGTH to MINIMUM_SLOTS_PER_EPOCH

* deterministic miningpool location

* point_value, not credit_value... use f64
2019-06-14 11:38:37 -07:00
Rob Walker
d1d53c3fb6 calculate stake from activated amount (#4630) 2019-06-10 16:17:29 -07:00
Rob Walker
a18c0e34f4 add activate_stake to stake_api (#4600) 2019-06-10 12:17:29 -07:00
Michael Vines
cfe5afd34c _id => _pubkey variable renaming (#4419)
* wallet: rename *_account_id to *_account_pubkey

* s/from_id/from_pubkey/g

* s/node_id/node_pubkey/g

* s/stake_id/stake_pubkey/g

* s/voter_id/voter_pubkey/g

* s/vote_id/vote_pubkey/g

* s/delegate_id/delegate_pubkey/g

* s/account_id/account_pubkey/g

* s/to_id/to_pubkey/g

* s/my_id/my_pubkey/g

* cargo fmt

* s/staker_id/staker_pubkey/g

* s/mining_pool_id/mining_pool_pubkey/g

* s/leader_id/leader_pubkey/g

* cargo fmt

* s/funding_id/funding_pubkey/g
2019-05-23 23:20:04 -07:00
Rob Walker
578c2ad3ea add bank hash to votes (#4381) 2019-05-21 21:45:38 -07:00
Rob Walker
58295b825d introduce syscalls (#4373) 2019-05-21 15:19:41 -07:00
Michael Vines
6374e69a69 Add mining pool wallet commands (#4360)
automerge
2019-05-21 07:32:38 -07:00
Rob Walker
87414de3e2 switch over to passive stakes (#4295)
* add failing test

* switch over to passive stakes

* test multiple stakers
2019-05-16 08:23:31 -07:00
Rob Walker
401764ddb1 add create_delegate_stake_account (#4197) 2019-05-07 17:08:49 -07:00
Greg Fitzgerald
51a2988bb2 Revert "Rename programs to instruction_processors (#3789)" (#3824)
This reverts commit 34344982a9.
2019-04-17 15:05:49 -06:00