Recent blockhash (Solana)
Last updated:
The RPC methods
getLatestBlockhash: Returns the latest blockhash together with lastValidBlockHeight, the last block height at which a transaction that uses this blockhash is still accepted. getLatestBlockhash reference →
isBlockhashValid: Answers whether a blockhash is still valid: it returns true or false for the blockhash you pass, at the commitment level you choose. isBlockhashValid reference →
Applies to: Solana
Endpoint and plans: Solana RPC endpoint.
In more detail
A transaction expires after 150 blocks. getLatestBlockhash returns a blockhash together with lastValidBlockHeight, the last block height at which it remains valid. A transaction should only be re-signed with a new blockhash after the old one has expired.