Skip to main content
TLDR:
  • Normal Solana transactions expire after ~80 seconds (150 slots) because they reference a recent blockhash.
  • Durable nonces replace the recent blockhash with a stored nonce value, removing the expiry window entirely.
  • The nonce must be advanced as the first instruction in the transaction.
  • This enables offline signing, scheduled transactions, and multi-party approval flows.

The problem: blockhash expiry

Every Solana transaction includes a recentBlockhash — a reference to a recent block that acts as a timestamp and replay-prevention mechanism. If the transaction is not confirmed within ~150 slots (~80 seconds), it expires and is dropped. This is a problem when:
  • Offline signing — the signer is air-gapped and can’t access the network in real time
  • Multi-sig approval — multiple parties need to sign, which takes longer than 80 seconds
  • Scheduled execution — you want to build a transaction now and submit it later
  • Custodial workflows — approval chains in enterprise systems

How durable nonces work

A nonce account is a special System Program account that stores:
  • authority — the pubkey authorized to advance the nonce
  • durable nonce — a hash value derived from a recent blockhash
  • lamports per signature — the fee rate when the nonce was last advanced
Instead of a recent blockhash, the transaction uses the nonce value. The nonce does not expire — it stays valid until someone advances it. The lifecycle:
  1. Create and initialize a nonce account
  2. Build the transaction with AdvanceNonceAccount as the first instruction and the nonce value as the recentBlockhash
  3. Sign the transaction (can be done offline, days or weeks later)
  4. Submit when ready — the nonce is advanced atomically, preventing replay
The AdvanceNonceAccount instruction must be the first instruction in the transaction. If it’s not at index 0, the transaction is processed as a regular (non-nonce) transaction and will fail if the blockhash is stale.

Get your own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

Prerequisites

The examples are shown in both Solana JavaScript libraries — both are actively maintained, so use whichever fits your project. @solana/kit is the newer, tree-shakable, functional SDK; @solana/web3.js is the classic Connection/PublicKey API.

Create a nonce account

TypeScript

Build and sign a transaction with a durable nonce

TypeScript

Submit the transaction later

TypeScript

Failure behavior

Understanding how nonce transactions fail is important:
  • Validation failure (nonce already used, authority not signed, account not found) — the entire transaction is dropped. No fees collected, no state changes.
  • Execution failure (an instruction returns an error after validation passes) — the nonce is still advanced and fees are still collected. This prevents replay while ensuring the validator is compensated.

Additional resources

Last modified on July 4, 2026