Menu

1 / 2

Solana transactions expire and nobody warned me πŸ’€

DEV CommunityΒ·Tanisha fonsecaΒ·5 months ago
#HZZRAfYF
#blockchain#mlh#100daysofsolana#transaction#blockhash
Reading 0:00
15s threshold

okay so I need to talk about something that genuinely caught me off guard during #100DaysOfSolana and I feel like nobody explains it properly so here we go

you know how in Web2, if you build an API call and it fails, you just... retry it? same request, same body, send again. worst case you get a duplicate, you handle it with idempotency keys, whatever the request itself doesn't have an expiry date baked in

Solana transactions have an expiry date baked in

like structurally. at the protocol level. you cannot opt out of it

let me explain because this is actually kind of wild

the blockhash thing

every Solana transaction contains something called a recent blockhash . it's a 32-byte hash of a recent block, and it's required you literally cannot construct a valid transaction without one

const { value : latestBlockhash } = await rpc . getLatestBlockhash ().…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.