5

I'm seeing a very high amount of BlockHeightExceeded errors. What could be the reason for these, and what are some possible troubleshooting steps that I can take to try to figure out the problem?

  • Could priority fees play a role in this? If I send transactions with no added priority fees, can it get "bumped" by other transactions and ultimately expire?

  • Does the transaction complexity play any role in how soon a transaction is processed? Are consumed "compute units" a good gauge for this?

  • I've tried across numerous RPCs and although some perform better than others, the core problem persists. It's not uncommon for transactions to take 3 minutes or more (through several retries) to get confirmed.

Any advice is greatly appreciated!

1
  • Which RPC are you using? I was using Alchemy RPC and encountered BlockHeightExceeded errors, but when I switched to QuickNode RPC, the errors disappeared. I hope this helps.
    – 바오밥
    Commented Mar 21 at 5:48

1 Answer 1

2

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 fees. With the growing demand for blockspace, most dapps today utilize these, which in turn means that if you aren't setting any, validators will prioritize transactions that have them over yours. More info on how to set them can be found here.
  • Next, Compute Budget (CB), though this is a bit more subtle. Each transaction has a default CB of 200k CUs, but can request up to 1.2M CUs. Important thing to note here though is that each block has a limit of 12M CUs per block, so in theory transactions that request less CUs are more likely to be included*
  • Different RPCs have different performance, so I'd recommend doing what you already did and trying out a few different ones to see which one works best.
  • Depending on your use case, sending Jito bundles with direct tips to validators might be a path to explore for you as well. Note that in this case you're competing with tips from mostly arbitrage bots though, so you'll most likely get outpriced here unless you care very much about getting your transaction through.
  • Finally, sometimes a transaction will just fail, no matter what you do. Retrying transactions is a discipline in itself as well, and solana cookbook has a great article on it here.

All in all, I'd say try priority fees + retry logic, first which should do the trick in 99% of use cases and only if you're working on something that needs super-duper fast & high reliability transactions worry about the CB and bundles.

*I say "in theory", as priority fees are set based on the number of CUs, so if your priority fees are high enough it might still be worth it for validators to include your bigger tx even if it means missing out on a few other txs. TL;DR don't request more CUs than you'll need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.