Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
e7a3de4
Initial population of solana-program-sdk
mvines Oct 19, 2020
3745fc3
Refactor stake program into solana_program (#17906)
joncinque Jun 15, 2021
ee5a93f
chore: cargo +nightly clippy --fix -Z unstable-options
Lichtso Jun 18, 2021
76cd4c3
Add vote/stake checked instructions
mvines Jul 1, 2021
528bd94
Eliminate doc warnings and fix some markdown (#18566)
brson Jul 16, 2021
8768c09
stake: Remove v2 program references (#19308)
joncinque Aug 20, 2021
51e7466
stake: Add BorshDeserialize trait to structs (#19958)
joncinque Sep 17, 2021
6bf0ad8
Add struct and convenience methods to track stake activation status (…
jstarry Oct 4, 2021
4ab116f
stake: Add `BorshSerialize` trait to structs (#20784)
joncinque Oct 19, 2021
8cceeb0
Pass Epoch by value in StakeHistory::get() (#21523)
brooksprumo Dec 1, 2021
33179a5
Reformat imports to a consistent style for imports
mvines Dec 3, 2021
1a9ccc2
Remove active features stake program v3 and v4 (#22612)
brooksprumo Jan 22, 2022
ed0cb26
Remove rewrite_rent_exempt_reserve() (#22741)
brooksprumo Jan 26, 2022
f676fbc
Add MINIMUM_STAKE_DELEGATION constant (#23259)
brooksprumo Feb 22, 2022
7ecd82d
Add GetMinimumDelegation stake program instruction (#24020)
brooksprumo Apr 2, 2022
c4a1ce5
Un-deprecate `MINIMUM_STAKE_DELEGATION` (#24089)
brooksprumo Apr 3, 2022
19673df
Add convenience function for programs to get minimum delegation (#24175)
brooksprumo Apr 13, 2022
f9164d5
Add StakeInstruction::DeactivateDelinquent
mvines Mar 25, 2022
1dd644b
Deprecate `MINIMUM_STAKE_DELEGATION` (#24329)
brooksprumo Apr 14, 2022
c70bb90
Add const fn StakeState::size_of and static assertion (#24416)
jstarry Apr 19, 2022
66718f1
And short descriptions to all solana-program modules and macros. (#24…
brson Apr 21, 2022
0677b75
Remove StakeState::get_rent_exempt_reserve()
mvines Apr 25, 2022
7e9cfa4
Fix derive_partial_eq_without_eq clippy lint
mvines May 23, 2022
1c8b851
Add new error if stake delegation is below the minimum (#25709)
brooksprumo Jun 2, 2022
1b4f7df
Add StakeInstruction::Redelegate
mvines Jun 28, 2022
7571655
Rust v1.63.0 (#27148)
bw-solana Aug 17, 2022
dabb1ce
Revert "Rust v1.63.0 (#27148)" (#27245)
bw-solana Aug 19, 2022
9d8ca5a
Rust v1.63 (#27303)
bw-solana Aug 23, 2022
d69343e
removes manual implementations of Default for enums (#29779)
behzadnouri Jan 19, 2023
49cee40
Bump borsh to 0.10.3 (#30975)
kevinji May 30, 2023
0e22ab0
Add stake flags struct (#32521)
HaoranYi Jul 18, 2023
4da0959
Add RedelegatedStakeMustFullyActivateBeforeDeactivationIsPermitted St…
HaoranYi Jul 18, 2023
648e806
Add stake_flags to stake state (#32524)
HaoranYi Jul 24, 2023
d7dc84c
sdk: Limited Borsh 0.9 support (Pubkey and helpers) (#32511)
joncinque Aug 2, 2023
e904714
stake: deprecate on chain warmup/cooldown rate and config (#32723)
AshwinSekar Aug 7, 2023
0f2fffc
sdk: Add new version of `StakeState` to avoid breaking downstream use…
joncinque Aug 8, 2023
8fda8b8
stake: Set the Delegation's warmup / cooldown to the correct default …
joncinque Aug 9, 2023
e80b860
stake: pub use config constants for api backwards compatibility (#32769)
AshwinSekar Aug 9, 2023
c8fb2e2
stake: Rename `StakeStateWithFlags` -> `StakeStateV2` (#32795)
joncinque Aug 10, 2023
093eab6
Upgrades Rust to 1.72.0 & nightly-2023-08-25 (#32961)
Lichtso Sep 1, 2023
98f2211
Fix bug of same-epoch stake deactivation after stake redelegation (#3…
HaoranYi Sep 25, 2023
3d1d074
Removes unnecessary #[allow(dead_code)] in stake flags (#34322)
brooksprumo Dec 5, 2023
74b3a20
sdk: Upgrade to borsh 1.2.1 (#34355)
joncinque Dec 8, 2023
28a4abd
refactor: optional `stake_history` arg is never `None` (#34556)
jstarry Dec 22, 2023
41c8f3f
[docs] updated readme and fix links (#34565)
nickfrosty Jan 3, 2024
8e0d38f
Use static memory layout for all sysvars (#249)
ripatel-fd Mar 15, 2024
c7d89d7
ff cleanup: reduce_stake_warmup_cooldown (#470)
AshwinSekar Apr 4, 2024
98f5c74
Check EpochRewards::active within the Stake Program (#617)
CriesofCarrots Apr 9, 2024
35c2a88
Removes deprecated MINIMUM_STAKE_DELEGATION (#963)
brooksprumo Apr 22, 2024
4c47d31
Add StakeError index comments (#1012)
CriesofCarrots Apr 24, 2024
ade6c17
solana-program: Make frozen-abi optional (#1222)
kevinheavey May 8, 2024
cfcae78
clippy: fix legacy_numeric_constants (#1314)
yihau May 15, 2024
d6cc4d3
solana-program: stake to program error (#1580)
2501babe Jun 4, 2024
7ccca04
Make borsh optional in sdk and program crates (#1576)
kevinheavey Jun 5, 2024
b9d496b
stake-program: `MoveStake` and `MoveLamports` (#1415)
2501babe Jun 29, 2024
00f338b
solana-program: `StakeHistorySyscall` and `get_entry` (#1404)
2501babe Jun 30, 2024
874c646
Extract decode-error from solana-program (#1813)
kevinheavey Jul 17, 2024
3d0c647
stake: Remove redelegate instruction (#2213)
joncinque Jul 29, 2024
5d20a53
fix: remove expensive versioned epoch stakes clone (#2453)
jstarry Aug 8, 2024
ddc78d1
fix: borrow stakes delegation during snapshot serialization (#2455)
jstarry Aug 8, 2024
2764893
Improve type safety in stake state module (#2482)
jstarry Aug 9, 2024
ecb134b
sdk: Extract clock crate (#1967)
kevinheavey Sep 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions interface/src/config.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
//! config for staking
//! carries variables that the stake program cares about

#[deprecated(
since = "1.16.7",
note = "Please use `solana_sdk::stake::state::{DEFAULT_SLASH_PENALTY, DEFAULT_WARMUP_COOLDOWN_RATE}` instead"
)]
pub use super::state::{DEFAULT_SLASH_PENALTY, DEFAULT_WARMUP_COOLDOWN_RATE};
use serde_derive::{Deserialize, Serialize};

// stake config ID
crate::declare_deprecated_id!("StakeConfig11111111111111111111111111111111");

#[deprecated(
since = "1.16.7",
note = "Please use `solana_sdk::stake::state::warmup_cooldown_rate()` instead"
)]
#[derive(Serialize, Deserialize, Debug, PartialEq, Clone, Copy)]
pub struct Config {
/// how much stake we can activate/deactivate per-epoch as a fraction of currently effective stake
pub warmup_cooldown_rate: f64,
/// percentage of stake lost when slash, expressed as a portion of u8::MAX
pub slash_penalty: u8,
}

impl Default for Config {
fn default() -> Self {
Self {
warmup_cooldown_rate: DEFAULT_WARMUP_COOLDOWN_RATE,
slash_penalty: DEFAULT_SLASH_PENALTY,
}
}
}
Loading