Skip to main content

Questions tagged [compute-budget]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
2 answers
47 views

What is the minimum amount of CUs a Solana transaction must process?

I ask this because I noticed even the no-op instruction uses a some compute units (I assume for loading the program and stuff like this) and it made me wonder. Is there a lower bound? Is it zero?
Ahri's user avatar
  • 4,100
2 votes
0 answers
12 views

What types of successful transactions would incur zero Computer Unit?

I'm exploring the raw dataset and realize that quite a lot of transactions consume zero computer units. Just curious to know what types of successful transactions would incur zero Computer Unit? Are ...
heyyo478's user avatar
0 votes
0 answers
15 views

Can’t send or swap my Solana

I can’t swap or send out my Solana the last interaction on it was compute budget interaction
Patron's user avatar
  • 1
1 vote
2 answers
92 views

React Frontend not working right with Anchor and localnet deployed Solana Program which passes Anchor Test

So I am mainly backend focused and new to Solana trying to become a full stack dev. I am very new to frontend development and have been facing some problems there. So I've been working on my first ...
Mark's user avatar
  • 43
1 vote
2 answers
30 views

Where can I find how many CUs different operations and syscalls cost?

I know I can get this by trial and error and just running the operations I want to test it, but I'd imagine it's written down somewhere too. Where?
Ahri's user avatar
  • 4,100
0 votes
0 answers
50 views

When landing Jupiter Swap transaction i'm getting error: "Program Error: "Instruction #1 Failed - Fallback functions are not supported"

can anyone help me in adding the compute limit and compute price in a transaction using Python? I'm trying to add both instructions (compute limit and compute price) to the Jupiter Swap transaction ...
TheLastSamurai's user avatar
0 votes
0 answers
53 views

How do I send Spl tokens to other wallet consistently?

I'm new to solana development but I'm facing an issue. I'm writing a function to send spl tokens to other wallets using the private keys. I'm coding in Javascript. The issue I've been facing is that ...
Olaiwola Ayoola's user avatar
3 votes
1 answer
850 views

How to set Compute Limit and Compute Unit Price using Python

I would like to set Compute Limit and Compute Unit Price before sending my transaction (Jupiter swap). I want to do this in order to optimize the Compute Units of my transaction. However, I cannot ...
TheLastSamurai's user avatar
2 votes
1 answer
22 views

Are transaction compute costs static or variable?

Do transactions with the same set of instructions (but just different accounts passed in) use the same amount of compute each time? Or is it variable?
josephtaylor.art's user avatar
1 vote
1 answer
247 views

How to calculate Compute Budget using solana web3js

I am using solana web3js to interact with a program and send tx. In some of the transactions, it fails due to Compute Units limit. I can increase the Compute Unit to a very high fixed number and make ...
idrispendisbey's user avatar
1 vote
1 answer
50 views

Compute Budget Program Behavior: Direct Call vs. CPI Call and Missing Fees Issue

I've been experimenting with the Compute Budget program to manage transaction costs and noticed something odd. When I invoke Compute Budget directly, everything works as expected. However, invoking it ...
GLG's user avatar
  • 11
1 vote
2 answers
306 views

How to Add ComputeBudget into Versioned Transaction?

I want to Modify the compute unit for Versioned Transactions but there are some issue with that. Before i Have used it for legacy transaction but now when i want to add new compute unit size to ...
Siavash Soleimanpour's user avatar
3 votes
1 answer
65 views

Are writes to BTreeMaps expensive? How much compute units does it take?

I am using a quite a few BTreeMaps and i am writing to 2 BTreeMaps and it is using all the compute units. So i wanted to know how much compute units it takes and what can be the alternatives for using ...
Dhruv D Jain's user avatar
3 votes
1 answer
185 views

How are additional costs calculated with the `requestHeapFrame` instruction?

When I use the requestHeapFrame instruction to request more heap, I expect it likely adds additional cost to my transaction. How do I calculate how much additional cost it would take?
Jacob Creech's user avatar
  • 3,854
1 vote
1 answer
185 views

Does requesting more compute units increase the fee for a transaction?

Here's a transaction that requests 1million compute units https://explorer.solana.com/tx/kmkRyvKjWtDuHMbPEGkouXe4Nm3ysdGgiGbr5bzsdnQrXfs7FqnpDWaRBf4KBU91hghPJjTC2Tyv5mcNeTV8nbb?cluster=devnet Here's a ...
john's user avatar
  • 7,445
1 vote
0 answers
47 views

On-chain performance of HashSet

How many Compute Units (CU) does it cost to init a HashSet on-chain and perform a contains() check? Intuitively, the limited bpf instruction set will have a high overhead for hashing. Consider these ...
Whiteseal's user avatar
  • 3,185
2 votes
1 answer
246 views

Error downloading the ComputeBudget program to use on local validator

Per the Solana Cookbook, I'd like to set a transaction priority by using fees. transaction.add( ComputeBudgetProgram.setComputeUnitLimit({ units: 1_000_000, }) ); transaction.add( ...
mikemaccana's user avatar
  • 2,051
2 votes
1 answer
648 views

How do priority fees (from the ComputeBudget program) prioritize transactions?

If I add a higher fee to my transaction, will it helps me get a better (faster) slot/block? Or is the priority fee only for competing with other transactions within the same slot? Here's the example ...
Faiq R's user avatar
  • 21
3 votes
1 answer
708 views

How to programmatically find the amount of compute units used in a transaction?

Title. Looking to do this from my bpf tests.
Ripleys 0x's user avatar
3 votes
2 answers
1k views

How to Increase compute limit above 200k compute

I am making a CPI to a heavy instruction in another program and running into insufficient compute limit issues. How do I increase the compute limit for my instruction. I once saw up to 1.4M compute ...
chinepun.sol's user avatar
1 vote
1 answer
110 views

How Many CUs are used by ComputeBudgetProgram?

I am using the ComputeBudgetProgram.setComputeUnitLimit & ComputeBudgetProgram.setComputeUnitPrice instructions to reduce the CU budget for a small transfer transaction and increase the ...
Brian Long's user avatar
2 votes
3 answers
139 views

How do you split a function call across multiple instructions? (How can I get around the compute limit)

I'm trying to verify ZK proofs on solana, but running into compute limits. I was told I can break things into multiple instructions to get around compute limits but I'm not sure how to do that exactly....
Dev Bharel's user avatar
3 votes
1 answer
368 views

How to increase compute_budget?

I want to increase compute budget, but I got following error message. How to add compute_budget instruction ? Rust let payer = &Keypair::from_base58_string("*******************"); ...
picorypt's user avatar