← Back to Blog
How to land transactions on Solana?

How to land transactions on Solana?

Written by Solana TrackerPublished on 2024-10-10

Landing Transactions on Solana

Introduction

Understanding how transactions work on Solana is crucial for developers. This guide will help you grasp the basics and improve your transaction success rate.

What's a Blockhash?

A blockhash is like a timestamp for your transaction. It comes from the latest Proof of History (PoH) hash. Blockhashes prevent duplicate transactions and give them a lifespan. If a blockhash is too old (more than 150 blocks or about 1 minute 19 seconds), the transaction is rejected.

How Transactions are Submitted

Transactions can be sent to Solana in two ways:

  1. Through an RPC server
  2. Using a TPU (Transaction Processing Unit) Client

RPC Server Method

When you use an RPC server:

  • It sends your transaction to the current and next leader validator
  • It keeps trying every two seconds until the transaction is finalized or expires

TPU Client Method

The TPU Client just submits the transaction once. Your software needs to handle resending and forwarding to leaders.

How Transactions are Processed

Validators process transactions in five stages:

  1. Fetch: Receives and categorizes transactions
  2. SigVerify: Checks transaction signatures
  3. Banking: Filters and processes transactions
  4. Proof of History: Records the passage of time
  5. Broadcast: Sends processed transactions to the network

Why Do Transactions Fail?

Transactions can fail for several reasons:

  • Network drops the transaction
  • Blockhash is too old or incorrect
  • RPC nodes are out of sync
  • Temporary network forks

Tips for Successful Transactions

Here are some key tips to improve your transaction success rate:

  1. Use Recent Blockhashes: Get the latest blockhash with "confirmed" or "finalized" commitment
  2. Skip Preflight Checks: Set skipPreflight to true if you're confident in your transaction
  3. Optimize Compute Units: Request only the compute units you need
  4. Use Priority Fees: Add dynamic priority fees to make your transaction more attractive to validators
  5. Implement Retry Logic: Create your own system to retry failed transactions
  6. Consider Staked Connections: These can improve your transaction priority
  7. Use Durable Nonces: For transactions that aren't time-sensitive

Conclusion

Landing transactions on Solana requires understanding the network and using the right strategies. By following these tips, you can significantly improve your success rate. As Solana evolves, stay informed about new updates and features to optimize your transactions.

RPC Nodes

Did you know? All RPC Nodes from us, use Staked Connections to send transactions!

By using our RPC Nodes, you automatically benefit from staked connections. This means:

  • Higher priority for your transactions
  • Improved transaction success rates
  • Better overall performance for your Solana applications

To get started with our RPC Nodes, visit https://www.solanatracker.io/solana-rpc.