Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 87a5c79

Browse files
authored
stake-pool: Reduce minimum stake per validator to 0.001 SOL (#2373)
* stake-pool: Reduce minimum stake per validator to 0.01 SOL * Lower the limit to 0.001 SOL
1 parent 36e8863 commit 87a5c79

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

stake-pool/program/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const TRANSIENT_STAKE_SEED_PREFIX: &[u8] = b"transient";
3030

3131
/// Minimum amount of staked SOL required in a validator stake account to allow
3232
/// for merges without a mismatch on credits observed
33-
pub const MINIMUM_ACTIVE_STAKE: u64 = LAMPORTS_PER_SOL;
33+
pub const MINIMUM_ACTIVE_STAKE: u64 = LAMPORTS_PER_SOL / 1_000;
3434

3535
/// Maximum amount of validator stake accounts to update per
3636
/// `UpdateValidatorListBalance` instruction, based on compute limits

stake-pool/program/src/processor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ impl Processor {
749749
&[bump_seed],
750750
];
751751

752-
// Fund the stake account with 1 SOL + rent-exempt balance
752+
// Fund the stake account with the minimum + rent-exempt balance
753753
let required_lamports = MINIMUM_ACTIVE_STAKE
754754
+ rent.minimum_balance(std::mem::size_of::<stake_program::StakeState>());
755755

stake-pool/program/tests/increase.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ use {
1212
transaction::{Transaction, TransactionError},
1313
},
1414
spl_stake_pool::{
15-
error::StakePoolError, find_transient_stake_program_address, id, instruction, stake_program,
15+
error::StakePoolError, find_transient_stake_program_address, id, instruction,
16+
stake_program, MINIMUM_ACTIVE_STAKE,
1617
},
1718
};
1819

@@ -345,17 +346,14 @@ async fn fail_with_small_lamport_amount() {
345346
_reserve_lamports,
346347
) = setup().await;
347348

348-
let rent = banks_client.get_rent().await.unwrap();
349-
let stake_rent = rent.minimum_balance(std::mem::size_of::<stake_program::StakeState>());
350-
351349
let error = stake_pool_accounts
352350
.increase_validator_stake(
353351
&mut banks_client,
354352
&payer,
355353
&recent_blockhash,
356354
&validator_stake.transient_stake_account,
357355
&validator_stake.vote.pubkey(),
358-
stake_rent,
356+
MINIMUM_ACTIVE_STAKE - 1,
359357
validator_stake.transient_stake_seed,
360358
)
361359
.await

0 commit comments

Comments
 (0)