Skip to main content

Module compute_budget

Module compute_budget 

Source
Expand description

Compute-budget heuristics derived from logs.

The Solana runtime does not log the requested compute-unit limit directly. What it does expose is the budget figure Y in consumed X of Y compute units; for the outermost invocation that equals the transaction’s available budget. We use the maximum observed budget as the best log-only estimate of the requested limit, and flag it as an estimate.

Constants§

COMPUTE_BUDGET_PROGRAM_ID
The Compute Budget program ID.

Functions§

estimated_requested_limit
Best log-derived estimate of the requested compute-unit limit, if any consumed … of Y … line was seen.
used_compute_budget_program
Whether the Compute Budget program was invoked in this transaction.