Repository navigation
fix(compute-unit): reserve the default CUs for Stake, Config and ALT - #1517
Iamsohungrynow wants to merge 2 commits into
Conversation
|
@Iamsohungrynow is attempting to deploy a commit to the Solana Foundation Team on Vercel. A member of the Team first needs to authorize it. |
[Medium impact] The PR appears safe to merge; no new actionable issues were found. SummaryUpdates compute-unit estimates for Stake, Config, and Address Lookup Table programs.
Reviews (2) · Last reviewed commit: "fix(compute-unit): use the migration epo..." · Reviewed by Greptile |
| */ | ||
| const BUILTIN_PROGRAMS_3K: readonly string[] = [ | ||
| '11111111111111111111111111111111', // System Program | ||
| 'Stake11111111111111111111111111111111111111', // Stake Program |
There was a problem hiding this comment.
question/issue: Removing Stake and ALT from BUILTIN_PROGRAMS_3K changes the reserve for every epoch, so transactions from before each migration show 200,000 where master shows the correct 3,000. I think it's an issue and we should take epoch into account. What do you think @Woody4618 ?
There was a problem hiding this comment.
ahh good point, i added an entry for each migration, so alt keeps 3k until epoch 762 and stake until 823 on mainnet (devnet 849/917, testnet 756/813). config was already core bpf before the 3k change on every cluster, now it stays out of the list
Description
Stake, Config and ALT run as Core BPF programs now, so the runtime reserves the default 200k for them, but they were still in the 3k builtin list. a plain delegate tx (
5PjwEDEdNSLv7uYTe3cjoyRcqDA7PGVnGXq1LoH1LDEy17ymV4ePvPfZy3Gz8CLnS3LiPdyu9LhAUQUqkY45NRgf) logsconsumed 16053 of 200000and the tx page shows16,053 / 3,000. same fix #1076 did for VoteType of change
Screenshots
N/A, the CU limit for that tx goes from 3,000 to 200,000
Testing
12 new cases in
compute-units-schedule.spec.ts(the 3 programs now, ALT and Stake before and at their migration epoch on each cluster, Config at 759, a Stake tx without a compute budget, and the real parsed5PjwEDEdinstruction) fail on master and pass after, 37/37. eslint, prettier andtsc --noEmitcleanRelated Issues
N/A
Checklist
pnpm test,pnpm lint,pnpm typecheck)build:infoscript to update build informationAdditional Notes
alt and stake keep 3k until their core bpf migration epochs (from
feature-gates.json), config was already core bpf on every cluster when the 3k feature activated