in-solana by Supanode

What Is Durable Nonce in Solana?

A durable nonce is a mechanism that allows Solana transactions to remain valid indefinitely, bypassing the normal blockhash expiration window (~60–90 seconds). Instead of using a recent blockhash, the transaction uses a nonce value stored in an on-chain nonce account.

Why durable nonces exist

Standard Solana transactions must be submitted within ~60–90 seconds of fetching their blockhash. This is too short for some use cases:

  • Offline signing — hardware wallets or air-gapped machines
  • Multisig approvals — collecting signatures from multiple parties
  • Scheduled transactions — transactions prepared now for later execution
  • Custodial workflows — approval chains that take hours or days

How durable nonces work

  1. Create a nonce account with the System Program CreateNonceAccount instruction
  2. The nonce account stores a nonce value (a hash) and the authority
  3. Build a transaction using the nonce value instead of a recent blockhash
  4. The first instruction in the transaction must be AdvanceNonceAccount
  5. Submit the transaction at any time — it remains valid as long as the nonce has not been advanced

Nonce advance

The AdvanceNonceAccount instruction replaces the stored nonce with a new value. This ensures each nonce can only be used once, preventing replay attacks. The nonce is advanced as part of the transaction that uses it.

FAQ

Does a durable nonce transaction cost more? Yes, slightly. The AdvanceNonceAccount instruction adds a small compute cost. Additionally, the nonce account requires rent-exempt lamports.

Can the nonce expire? No. Unlike blockhashes, a stored nonce remains valid until it is explicitly advanced. However, if someone else advances the nonce, any previously signed transaction using the old nonce becomes invalid.

Who can advance the nonce? Only the nonce authority (set at creation) can advance the nonce. The authority can be transferred.

Updated: