Skip to main content
4 votes
Accepted

How to set Compute Limit and Compute Unit Price using Python

The idea is that the compute limit and compute limit price are instructions. And from the Jupiter API we already get a transactions object. Thus we have to add these priority fee instructions to the ...
sashavsthewrld's user avatar
4 votes

How to Increase compute limit above 200k compute

https://solanacookbook.com/references/basic-transactions.html#how-to-change-compute-budget-fee-priority-for-a-transaction Use ComputeBudgetProgram.setComputeUnitLimit({ units: number }) to set the ...
john's user avatar
  • 7,794
3 votes

How to Increase compute limit above 200k compute

I haven't really found great docs on it, but I believe the way it works is that your transaction's first instruction must be this: https://github.com/solana-labs/solana/blob/...
HelmetFace's user avatar
  • 1,807
3 votes
Accepted

How does the Solana BPF VM calculate how many Compute Units a program consumes?

You've done your research really well! You're correct on everything. syscalls have costs that are defined in the compute budget BPF instructions all consume 1, as seen as https://github.com/solana-...
Jon C's user avatar
  • 19.6k
2 votes

How can I analyze the reason for frequent BlockHeightExceeded errors?

Transaction failure is a tricky subject in Solana, but there a few things you can do to increase the likelihood of your transactions going through: As you said, the main thing is definitely priority ...
McBain's user avatar
  • 5,384
1 vote
Accepted

Are transaction compute costs static or variable?

Consider an instruction like this : pub fn my_instruction( ctx: Context<MyInstruction>, my_param: u64, ) -> Result<()> { let mut res = 0; if my_param == 1 { for ...
McBain's user avatar
  • 5,384
1 vote

How compute unites and Lamports are interrelated

In a program you can log the compute units and calculate so what costs how much compute. sol_log_compute_units(); or you can use a macro like this: /// Total extra compute units used per ...
Jonas H.'s user avatar
  • 7,219
1 vote

increase solana compute budget on localnet

Here is how you can change the compute budget using web3.js. In the code snippet we increase it to 400k CU import * as anchor from "@project-serum/anchor"; const ix = anchor.web3....
Jimii's user avatar
  • 7,712

Only top scored, non community-wiki answers of a minimum length are eligible