Skip to content

runtime: shrinking stake account bound by 2 OOM#10150

Open
ibhatt-jumptrading wants to merge 3 commits into
mainfrom
ibhatt/stake_bound
Open

runtime: shrinking stake account bound by 2 OOM#10150
ibhatt-jumptrading wants to merge 3 commits into
mainfrom
ibhatt/stake_bound

Conversation

@ibhatt-jumptrading

Copy link
Copy Markdown
Contributor

DONT MERGE UNTIL STAKE PROGRAM V5 IS ACTIVE

Copilot AI review requested due to automatic review settings June 10, 2026 15:53
@github-actions

Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-424669000-perf per slot 0.043367 s 0.043389 s 0.051%
backtest mainnet-424669000-perf snapshot load 1.369 s 1.356 s -0.950%
backtest mainnet-424669000-perf total elapsed 56.203326 s 56.232327 s 0.052%
firedancer mem usage with mainnet.toml 1135.39 GiB 1023.39 GiB -9.864%

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adjusts the runtime’s stake-account sizing assumptions to prevent OOM by lowering the maximum stake account bound based on Stake Program v5’s new minimum stake-account balance, and updates the accompanying rationale.

Changes:

  • Updates the stake-account cost model comment to reflect Stake Program v5 minimum-balance requirements.
  • Reduces FD_RUNTIME_MAX_STAKE_ACCOUNTS from 241000000UL to 2150000UL.

Comment on lines +29 to +40
For stake accounts, the rent exempt reserve is 0.00228 SOL. However,
new stake accounts must have a minimum balance of 1 SOL as of the
feature upgrade_bpf_stake_program_to_v5. Stake accounts created
after the feature must have a balance of 1.00228 SOL. To guard
against a potential attack, we need to guard against the creation of
550,000 SOL worth of stake accounts: 550,000 SOL / 1.00228 SOL =
roughly 550,000 stake accounts. In addition to the 1.6 million stake
accounts which exist on mainnet today, we must support roughly 2.15
million stake accounts. */

#define FD_RUNTIME_MAX_VOTE_ACCOUNTS (19000000UL)
#define FD_RUNTIME_MAX_STAKE_ACCOUNTS (241000000UL)
#define FD_RUNTIME_MAX_STAKE_ACCOUNTS (2150000UL)
Comment on lines +29 to +40
For stake accounts, the rent exempt reserve is 0.00228 SOL. However,
new stake accounts must have a minimum balance of 1 SOL as of the
feature upgrade_bpf_stake_program_to_v5. Stake accounts created
after the feature must have a balance of 1.00228 SOL. To guard
against a potential attack, we need to guard against the creation of
550,000 SOL worth of stake accounts: 550,000 SOL / 1.00228 SOL =
roughly 550,000 stake accounts. In addition to the 1.6 million stake
accounts which exist on mainnet today, we must support roughly 2.15
million stake accounts. */

#define FD_RUNTIME_MAX_VOTE_ACCOUNTS (19000000UL)
#define FD_RUNTIME_MAX_STAKE_ACCOUNTS (241000000UL)
#define FD_RUNTIME_MAX_STAKE_ACCOUNTS (2150000UL)
Comment on lines +32 to +33
after the feature must have a balance of 1.00228 SOL. To guard
against a potential attack, we need to guard against the creation of
@github-actions

Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-424669000-perf per slot 0.050777 s 0.050584 s -0.380%
backtest mainnet-424669000-perf snapshot load 1.536 s 1.57 s 2.214%
backtest mainnet-424669000-perf total elapsed 65.807276 s 65.556553 s -0.381%
firedancer mem usage with mainnet.toml 506.41 GiB 393.41 GiB -22.314%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants