runtime: shrinking stake account bound by 2 OOM#10150
Open
ibhatt-jumptrading wants to merge 3 commits into
Open
runtime: shrinking stake account bound by 2 OOM#10150ibhatt-jumptrading wants to merge 3 commits into
ibhatt-jumptrading wants to merge 3 commits into
Conversation
Performance Measurements ⏳
|
Contributor
There was a problem hiding this comment.
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_ACCOUNTSfrom241000000ULto2150000UL.
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 |
Performance Measurements ⏳
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DONT MERGE UNTIL STAKE PROGRAM V5 IS ACTIVE