Commit Graph

14 Commits

Author SHA1 Message Date
Jack May 1adf255e3a
Deprecate more Fee/Blockhash APIs (#21140) 2021-11-02 16:38:23 -07:00
Jon Cinque 0419e6c22e
program-test: Fix getting new blockhash post-warp (#20710) 2021-10-15 14:58:09 +02:00
Justin Starry 0ddb34a0b4
Add struct and convenience methods to track stake activation status (#20392)
* Add struct and convenience methods to track stake activation status

* fix nits

* rename
2021-10-04 18:59:11 -04:00
Jon Cinque 2c3bdedea3
stake: Advance `credits_observed` on activation epoch (#19309)
* stake: Advance `credits_observed` on activation epoch

* Add test for merging stakes just after activation
2021-09-03 23:20:56 +02:00
Jon Cinque 73aa004c59
stake: Remove v2 program references (#19308)
* stake: Remove v2 program references

* Remove stake v2 feature, along with stake rewrite
2021-08-20 01:08:44 -04:00
Jon Cinque 1b1d34da59
Refactor stake program into solana_program (#17906)
* Move stake state / instructions into solana_program

* Update account-decoder

* Update cli and runtime

* Update all other parts

* Commit Cargo.lock changes in programs/bpf

* Update cli stake instruction import

* Allow integer arithmetic

* Update ABI digest

* Bump rust mem instruction count

* Remove useless structs

* Move stake::id() -> stake::program::id()

* Re-export from solana_sdk and mark deprecated

* Address feedback

* Run cargo fmt
2021-06-15 18:04:00 +02:00
Jon Cinque f4214637a9
program-test: Add large bootstrap stake for realistic warmups (#16739) 2021-04-22 16:44:54 +02:00
Jeff Washington (jwash) 105a6bfb46
Replace RootsTracker HashSet (#16310)
* Replace RootsTracker HashSet

* use bitvec

* cleanup, add brenchmark test

* test cleanup

* add lots of tests

* get rid of demo

* change warp test constant

* get rid of unused function

* pr feedback

* reorder use

* rework get_all to remove range checks

* add tests, fix bugs
2021-04-12 12:11:33 -05:00
Jack May dee655df35
Cleanup use (#16327) 2021-04-02 08:54:09 -07:00
Jon Cinque 6cc22e62d4
program-test: Fix warp and staking issue (#16002)
Since program-test creates a test genesis and then adds fees and rent,
some of the genesis accounts get rent-collected after warping.  Most
notably, `StakeConfig` gets rent-collected, causing any stake operations
to fail after warp.  This fix creates genesis with the `Rent` and
`FeeRateGovernor` actually used by the bank.
2021-03-19 14:37:13 +01:00
Jack May b53cb8eb2d
Deprecate Instruction::new (#15695) 2021-03-04 05:46:48 +00:00
Trent Nelson 7f7370c306 Re-allow clippy::integer_arithmetic at crate-level 2021-02-17 13:55:08 -07:00
Jon Cinque c5be226821
program-test: Add warp tests for rent and stake rewards (#15136)
* program-test Add rent collection and stake rewards

* Improve tests to initialize vote state

* Update comment

* Update program-test/src/lib.rs

Co-authored-by: Michael Vines <mvines@gmail.com>

* Review feedback

* cargo fmt

* Avoid using hard-coded slots in tests

* Make genesis_config private

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-02-05 22:08:00 +01:00
Jon Cinque 8e93a784f3
program-test: Add ability to warp to the future (#14998)
* program-test: Add ability to warp to the future

* Make `start_local_server` take by value

* Remove clear_invoke_context
2021-02-03 23:31:36 +01:00