[{"data":1,"prerenderedAt":403},["ShallowReactive",2],{"learn\u002Flearn\u002Fhow-a-transaction-works":3,"learn\u002Flearn\u002Fhow-a-transaction-works-surround":392},{"id":4,"title":5,"body":6,"category":382,"description":383,"extension":384,"level":382,"meta":385,"navigation":386,"order":387,"path":388,"seo":389,"stem":390,"__hash__":391},"learn\u002Flearn\u002Fhow-a-transaction-works.md","What is actually inside a Solana transaction",{"type":7,"value":8,"toc":368},"minimark",[9,13,18,30,46,49,53,84,87,91,101,108,112,115,139,146,149,153,160,179,183,213,222,226,248,251,255,269,275,279,309,313],[10,11,12],"p",{},"A transaction is not a request to a server. It is a signed object that either executes completely\nor changes nothing at all. Here is what is in it, and why each part exists.",[14,15,17],"h2",{"id":16},"two-halves-signatures-and-a-message","Two halves: signatures and a message",[10,19,20,21,25,26,29],{},"A Solana transaction is ",[22,23,24],"code",{},"signatures"," plus a ",[22,27,28],{},"message",".",[31,32,33,41],"ul",{},[34,35,36,37,40],"li",{},"The ",[38,39,28],"strong",{}," contains a header, the list of account addresses it touches, a recent blockhash,\nand one or more compiled instructions.",[34,42,36,43,45],{},[38,44,24],{}," are over the serialized message. The first one belongs to the fee payer, and its\nsignature is the transaction's ID.",[10,47,48],{},"Because signatures cover the whole message, any change to an account list, an instruction, or the\nblockhash invalidates them. That is the entire tamper-resistance story at this layer.",[14,50,52],{"id":51},"the-box-it-has-to-fit-in","The box it has to fit in",[31,54,55,62,68,74],{},[34,56,57,58,61],{},"Legacy and v0 transactions are capped at ",[38,59,60],{},"1,232 bytes"," — the IPv6 minimum MTU (1,280) minus 48\nbytes of headers. Not a design flourish: it is what fits in one network packet.",[34,63,64,65,29],{},"A transaction carries at most ",[38,66,67],{},"12 signatures",[34,69,70,71,29],{},"It can reference at most ",[38,72,73],{},"64 accounts",[34,75,76,77,80,81,29],{},"The newer ",[38,78,79],{},"v1"," format raises the cap to ",[38,82,83],{},"4,096 bytes",[10,85,86],{},"The byte limit, not the account count, is usually what bites first. A legacy message spends 32 bytes\nper account, so a handful of instructions with many accounts overflows 1,232 bytes long before it\nreaches 64.",[14,88,90],{"id":89},"versioned-messages-and-lookup-tables","Versioned messages and lookup tables",[10,92,93,96,97,100],{},[38,94,95],{},"v0"," messages can point at an ",[38,98,99],{},"address lookup table",": an on-chain list of up to 256 public keys.\nThe message then refers to those accounts by one-byte index instead of carrying each 32-byte key.",[10,102,103,104,107],{},"The trade-off is deliberate: lookup-table accounts may be writable or read-only but ",[38,105,106],{},"cannot be\nsigners",". Signers and the fee payer always stay inline in the message, because a signature has to\ncover the key that produced it.",[14,109,111],{"id":110},"instructions-and-account-metas","Instructions and account metas",[10,113,114],{},"Each instruction names one program and carries:",[31,116,117,132],{},[34,118,119,120,123,124,127,128,131],{},"an ordered list of ",[38,121,122],{},"accounts",", each with ",[22,125,126],{},"is_signer"," and ",[22,129,130],{},"is_writable"," flags, and",[34,133,134,135,138],{},"an opaque ",[38,136,137],{},"data"," blob whose layout the program defines.",[10,140,141,142,145],{},"Programs can invoke other programs during execution; those are ",[38,143,144],{},"inner instructions",", recorded in\nmetadata but never serialized as top-level instructions.",[10,147,148],{},"The signer\u002Fwritable flags are not hints. The runtime enforces them: writing to an account that was\nnot marked writable fails, and using an account as a signer without a matching signature fails.",[14,150,152],{"id":151},"the-blockhash-and-its-expiry","The blockhash, and its expiry",[10,154,155,156,159],{},"Every transaction references a recent blockhash. It does two jobs: it prevents replay, and it gives\nthe transaction a deadline. A blockhash is usable for ",[38,157,158],{},"150 slots"," (151 ages, given zero-indexing).",[10,161,162,163,166,167,170,171,174,175,178],{},"At the current ",[38,164,165],{},"200 ms"," slot time that is roughly ",[38,168,169],{},"30 seconds"," — though slot production can skip\nor lag, which is why clients track ",[22,172,173],{},"lastValidBlockHeight"," from ",[22,176,177],{},"getLatestBlockhash"," rather than\nsetting their own timer.",[14,180,182],{"id":181},"fees-a-base-and-a-tip","Fees: a base and a tip",[31,184,185,194],{},[34,186,187,190,191,29],{},[38,188,189],{},"Base fee:"," 5,000 lamports per signature, so 0.000005 SOL for a typical one-signature payment.\nIt is split 50\u002F50 between burning and the validator, and it is charged ",[38,192,193],{},"even if execution fails",[34,195,196,199,200,203,204,207,208,212],{},[38,197,198],{},"Priority fee:"," set by a compute-unit price in ",[38,201,202],{},"micro-lamports per CU",", with the total equal to\n",[22,205,206],{},"ceil(price × requested CU limit \u002F 1,000,000)",". Note ",[209,210,211],"em",{},"requested",": you pay for the limit you ask\nfor, not the compute you actually use. All of it goes to the validator.",[10,214,215,216,221],{},"Those are the network's own fees, and they are only part of the bill. ",[217,218,220],"a",{"href":219},"\u002Flearn\u002Fwhat-a-payment-costs","What a payment costs, and\nwhy"," covers the rest — the protocol's cut and the permanent record on\nchain — and what each part is priced from.",[14,223,225],{"id":224},"compute-the-real-budget","Compute: the real budget",[31,227,228,235,241],{},[34,229,230,231,234],{},"A non-builtin instruction gets ",[38,232,233],{},"200,000 compute units"," by default; a builtin gets 3,000.",[34,236,237,238,29],{},"The transaction-wide cap is ",[38,239,240],{},"1,400,000 CU",[34,242,243,244,247],{},"The scheduler's per-block limit is ",[38,245,246],{},"60,000,000 CU"," — a capacity figure, not a per-transaction\nallowance.",[10,249,250],{},"Programs can request a different limit with the compute budget instructions, and that request is\nwhat the priority fee is calculated against.",[14,252,254],{"id":253},"simulation-preflight-and-what-sent-means","Simulation, preflight, and what \"sent\" means",[10,256,257,260,261,264,265,268],{},[22,258,259],{},"sendTransaction"," verifies signatures and ",[38,262,263],{},"simulates"," the transaction against a commitment level\nbefore forwarding, unless ",[22,266,267],{},"skipPreflight"," is set. Preflight failing is a strong signal the\ntransaction would fail on-chain — which is why apps simulate before showing a wallet popup.",[10,270,271,272,274],{},"But a successful preflight is not a confirmation. ",[22,273,259],{}," returns a signature as soon as\nan RPC accepts the submission. The transaction is only real once it is in a block and final.",[14,276,278],{"id":277},"commitment-after-alpenglow","Commitment after Alpenglow",[10,280,281,282,285,286,289,290,293,294,297,298,300,301,303,304,308],{},"Since Alpenglow activated on mainnet in ",[38,283,284],{},"epoch 1064 (21 October 2026)",", ",[22,287,288],{},"confirmed"," and\n",[22,291,292],{},"finalized"," both mean permanently committed; ",[22,295,296],{},"processed"," means executed in a bank but not yet\nfinal. Solana's upgrade notes recommend new code use ",[22,299,292],{},", and say ",[22,302,288],{}," is slated for\nremoval in a later release. See ",[217,305,307],{"href":306},"\u002Flearn\u002Fwhen-is-a-payment-final","the finality explainer"," for what\nthat changes at a counter.",[14,310,312],{"id":311},"sources","Sources",[31,314,315,323,330,337,350,361],{},[34,316,317],{},[217,318,322],{"href":319,"rel":320},"https:\u002F\u002Fsolana.com\u002Fdocs\u002Fcore\u002Ftransactions\u002Ftransaction-structure",[321],"nofollow","Transaction structure",[34,324,325],{},[217,326,329],{"href":327,"rel":328},"https:\u002F\u002Fsolana.com\u002Fdocs\u002Fcore\u002Ftransactions\u002Fversioned-transactions",[321],"Versioned transactions",[34,331,332],{},[217,333,336],{"href":334,"rel":335},"https:\u002F\u002Fsolana.com\u002Fdocs\u002Fcore\u002Fconstants-reference",[321],"Constants reference",[34,338,339,344,345],{},[217,340,343],{"href":341,"rel":342},"https:\u002F\u002Fsolana.com\u002Fdocs\u002Fcore\u002Ffees\u002Ffee-structure",[321],"Fee structure"," · ",[217,346,349],{"href":347,"rel":348},"https:\u002F\u002Fsolana.com\u002Fdocs\u002Fcore\u002Ffees\u002Fcompute-budget",[321],"Compute budget",[34,351,352,344,356],{},[217,353,259],{"href":354,"rel":355},"https:\u002F\u002Fsolana.com\u002Fdocs\u002Frpc\u002Fhttp\u002Fsendtransaction",[321],[217,357,360],{"href":358,"rel":359},"https:\u002F\u002Fsolana.com\u002Fdocs\u002Frpc\u002Fhttp\u002Fsimulatetransaction",[321],"simulateTransaction",[34,362,363],{},[217,364,367],{"href":365,"rel":366},"https:\u002F\u002Fdocs.anza.xyz\u002Fconsensus\u002Fcommitments",[321],"Anza: commitment status",{"title":369,"searchDepth":370,"depth":370,"links":371},"",2,[372,373,374,375,376,377,378,379,380,381],{"id":16,"depth":370,"text":17},{"id":51,"depth":370,"text":52},{"id":89,"depth":370,"text":90},{"id":110,"depth":370,"text":111},{"id":151,"depth":370,"text":152},{"id":181,"depth":370,"text":182},{"id":224,"depth":370,"text":225},{"id":253,"depth":370,"text":254},{"id":277,"depth":370,"text":278},{"id":311,"depth":370,"text":312},"technical","Signatures, a message, account flags, a blockhash with an expiry, a fee in micro-lamports, and a 1,232-byte box. The anatomy, with the real constants.","md",{},true,1,"\u002Flearn\u002Fhow-a-transaction-works",{"title":5,"description":383},"learn\u002Fhow-a-transaction-works","qpHvsF_FlGHq7pnJWpw3tqQICNwUnTCW4ZgqDukayJQ",[393,398],{"title":394,"path":395,"stem":396,"description":397,"children":-1},"Read before you sign","\u002Flearn\u002Fchecking-before-you-sign","learn\u002Fchecking-before-you-sign","The approval screen is the last moment anyone can stop a payment. What to check, and the difference between sending money and letting a program spend it later.",{"title":399,"path":400,"stem":401,"description":402,"children":-1},"How the ledger is written and shared","\u002Flearn\u002Fhow-the-ledger-works","learn\u002Fhow-the-ledger-works","Slots, shreds, Merkle roots, erasure coding, and a mempool that does not exist. The machinery between \"signed\" and \"everyone agrees\".",1795469626851]