Blockhash Management

Programming Model · Deep

The set of client-side practices for maintaining a valid recent blockhash to maximize transaction landing probability. Key techniques include polling getLatestBlockhash at intervals shorter than the ~60-90 second validity window, caching both the blockhash and its lastValidBlockHeight for expiry detection, using the confirmed commitment level for blockhash fetches to balance freshness and stability, and replacing stale blockhashes in retry logic before re-signing. Poor blockhash management is one of the most common causes of transaction failures in production Solana applications.

Related terms