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 ...
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 ...
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/...
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-...
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 ...
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 ...
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 ...
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....
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
compute × 10compute-budget × 6
send-transaction × 2
python × 1
cpi × 1
transactions × 1
solana-program × 1
lamports × 1
swap × 1
solana-test-validator × 1
price × 1
hashing × 1
bpf × 1
runtime × 1
sendtransactionerror × 1
latency × 1
httpapi × 1
transaction × 1
instruction × 1
priority-fees × 1
cu × 1