Solana Transaction Expired: Blockheight Exceeded & Priority Fees
The Solana "Transaction Expired: Blockheight Exceeded" error occurs when a signed transaction is not processed by validators before its recentBlockhash expires (approximately 150 slots or 60–90 seconds). On Solana, blockhashes serve as transaction nonces. If network congestion causes validator leaders to drop your transaction, current cluster blockheight surpasses lastValidBlockHeight, rendering the transaction dead. Attach dynamic ComputeBudget priority fees and implement a fresh blockhash retry loop.
# Root Cause & Technical Architecture
Solana eliminates EVM-style transaction nonces by binding each transaction to a recent blockhash (`recentBlockhash`). A blockhash remains valid for exactly 150 slots (~60-90 seconds). When a transaction is submitted, the RPC node tracks `lastValidBlockHeight`. During periods of heavy mempool congestion, validator leaders discard low-fee transactions. Once cluster height exceeds `lastValidBlockHeight`, the transaction can never be included, triggering `TransactionExpiredBlockheightExceededError`.
# 4-Step Actionable Diagnostic Protocol
Step-by-Step ResolutionImplement Dynamic Priority Fee Instructions
Add ComputeBudgetProgram.setComputeUnitPrice({ microLamports: ... }) based on the 75th percentile of recent fees via getRecentPrioritizationFees.
Fetch Blockhashes with "confirmed" Commitment
Query connection.getLatestBlockhash("confirmed") immediately before signing to maximize the ~150 slot validity window.
Use sendAndConfirmTransaction with Fresh Retries
Do not re-sign expired transactions with the same stale blockhash. Fetch a brand new blockhash and re-sign before resubmitting.
Utilize Multiple Parallel RPC Nodes for Broadcasting
Submit transaction wire bytes concurrently to multiple independent RPC endpoints (e.g. Helius, Triton, QuickNode) to maximize leader reception.
# Diagnostic Verification Code / Command
typescript// Resilient Solana Transaction Submission with Fresh Blockhash
import { Connection, Transaction, ComputeBudgetProgram } from '@solana/web3.js';
async function sendWithPriority(connection: Connection, tx: Transaction, signers: any[]) {
// 1. Add Compute Unit Price (Priority Fee)
tx.add(ComputeBudgetProgram.setComputeUnitPrice({ microLamports: 100_000 }));
// 2. Fetch fresh blockhash with latest validity window
const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash('confirmed');
tx.recentBlockhash = blockhash;
tx.sign(...signers);
// 3. Send raw transaction
const signature = await connection.sendRawTransaction(tx.serialize(), {
skipPreflight: false,
maxRetries: 3
});
// 4. Confirm before blockheight exceeds threshold
await connection.confirmTransaction({ signature, blockhash, lastValidBlockHeight }, 'confirmed');
return signature;
} Launch Derivation Path Inspector
Execute client-side cryptographic simulation and parameter checks safely in your browser via native WebCrypto without sending private keys or mnemonics over the wire.
Read Full Investigation & Recovery Workflow
Explore complete architectural diagrams, edge-case failure trees, and detailed post-mortem analysis in our verified deep guide.
# Related Diagnostic Codes in Solana & Bitcoin
Related Hex StatusesSolana Error 0x1771 (6001): Slippage Tolerance Exceeded Fix
Fix Solana error 0x1771 (decimal 6001) Slippage Tolerance Exceeded. Troubleshoot Jupiter and Raydium swap reverts, priority fees, and price volatility.
Solana Error 0x1: Insufficient Lamports for Rent Exemption Fix
Fix Solana Custom Program Error 0x1 Insufficient Funds. Troubleshoot missing lamports for account rent exemption, token transfers, and fee payer balances.
Solana Anchor Error 0xbc4 (3012): AccountNotInitialized Fix
Fix Anchor error 0xbc4 (decimal 3012) AccountNotInitialized. Resolve missing Associated Token Accounts (ATA), program state creation, and pre-instructions.
# Frequently Asked Questions
FAQ SchemaHow long is a Solana blockhash valid?
A Solana blockhash is valid for exactly 150 slots. At average slot times of 400ms to 600ms, this equates to roughly 60 to 90 seconds.
Does an expired transaction cost any fees on Solana?
No. If a transaction expires because its blockheight was exceeded without landing in a block, zero transaction fees are deducted.
Why did my transaction expire even though I set high priority fees?
If the RPC node you submitted to was experiencing WebSocket delays or network partitions, it may have failed to propagate packets to active leader validators.