Commit Graph

16 Commits

Author SHA1 Message Date
HaoranYi d25d53e979
Fix bug of same-epoch stake deactivation after stake redelegation (#32606)
* fix stake deactivation in the same epoch after redelegation bug

add tests

refactor common code into fn

avoid early return

add feature gate for the new stake redelegate behavior

move stake tests out of cli

add stake-program-test crate

reimplemnt stake test with program-test

remove stake-program-test crate

reviews

add setup.rs

remove clippy

reveiws

* reviews

* review comments

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-09-25 16:35:40 -05:00
Jon Cinque c73a56faf8
stake: Rename `StakeStateWithFlags` -> `StakeStateV2` (#32795) 2023-08-11 01:07:21 +02:00
Jon Cinque 8e4a9a94ed
sdk: Add new version of `StakeState` to avoid breaking downstream users (#32736)
* sdk: Rename `StakeState` -> `StakeStateWithFlags`

* Add back `StakeFlags` with a deprecation warning
2023-08-09 00:05:40 +02:00
Ashwin Sekar fa3506631a
stake: deprecate on chain warmup/cooldown rate and config (#32723)
* stake: deprecate on chain warmup/cooldown rate and config

* Pr feedback: Deprecate since 1.16.7

Co-authored-by: Jon Cinque <me@jonc.dev>

---------

Co-authored-by: Jon Cinque <me@jonc.dev>
2023-08-07 13:23:24 -07:00
HaoranYi 719ba8c84f
Add RedelegatedStakeMustFullyActivateBeforeDeactivationIsPermitted StakeError (#32522)
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-07-18 12:52:40 -05:00
Michael Vines 48862c575a Add StakeInstruction::Redelegate 2022-07-27 20:24:25 -06:00
Brooks Prumo 0b2d5291f8
Add new error if stake delegation is below the minimum (#25709) 2022-06-01 20:29:57 -05:00
Michael Vines b05c7d91ed Fix derive_partial_eq_without_eq clippy lint 2022-05-22 22:22:21 -07:00
Justin Starry 2ad1baa753
Add const fn StakeState::size_of and static assertion (#24416) 2022-04-20 01:04:12 +08:00
Michael Vines 57ff7371b4 Add StakeInstruction::DeactivateDelinquent 2022-04-14 01:49:22 -04:00
Brooks Prumo e146e860e2
Add convenience function for programs to get minimum delegation (#24175) 2022-04-13 14:41:52 -05:00
Brooks Prumo 2af6753808
Add GetMinimumDelegation stake program instruction (#24020) 2022-04-02 05:11:10 +00:00
Michael Vines b8837c04ec Reformat imports to a consistent style for imports
rustfmt.toml configuration:
  imports_granularity = "One"
  group_imports = "One"
2021-12-03 09:19:13 -08:00
Brian Anderson 37ee0b5599
Eliminate doc warnings and fix some markdown (#18566)
* Fix link target in doc comment

* Fix formatting of log examples in process_instruction

* Fix doc markdown in solana-gossip

* Fix doc markdown in solana-runtime

* Escape square braces in doc comments to avoid warnings

* Surround 'account references' doc items in code spans to avoid warnings

* Fix code block in loader_upgradeable_instruction

* Fix doctest for loader_upgradable_instruction
2021-07-16 00:40:07 +00:00
Michael Vines ee219ffa47 Add vote/stake checked instructions 2021-07-06 21:53:18 +00: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