Commit Graph

49 Commits

Author SHA1 Message Date
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
Amr Ali 34344982a9
Rename programs to instruction_processors (#3789)
* Rename programs to instruction_processors

* Updates around the code base to support instruction_processors rename

* Kabab instruction_processors

* Update Cargo.toml files and scripts to use instruction-processors

* Update Cargo.toml to use instruction-processors

* Update CI scripts to use instruction-processors
2019-04-16 22:39:00 +02:00
Rob Walker f1e7237c09
vote_api cleanup (#3710)
* vote_api cleanup

* fixups

* fixup

* remove unused code

* revert removal of serialize and deserialize

* ...

* increase coverage, bootstrap staking

* Sagar's STAKE to my VOTE
2019-04-10 17:52:47 -07:00
Rob Walker 79bf3cf70d
add rewards math (#3673)
* add rewards math

* fixup
2019-04-07 21:45:28 -07:00
Sagar Dhawan 0b23af324b
Refactor Storage Program (#3622)
* Refactor Storage Program

* Replace KeyedAccount trait with StorageAccount struct

* Implement State for Account, not StorageAccount

* Make State trait more generic

* Move validation check into function
2019-04-04 12:01:09 -07:00
Rob Walker 25a2f08f8d
add passive staking and rewards (#3579)
* add stake stuff

* more generic

* test decode bail cases

* favor early returns
2019-04-01 16:45:53 -07:00