Learn · Updated November 18, 2026

Program logs or instruction data: which one tells you what happened?

Solana program logs vs instruction data comes down to timing. Instruction data is written by the sender and travels inside the transaction, so it shows what was asked for, even from raw shreds. Program logs are written by programs while the transaction executes, so they show what happened, but exist only in execution data, never in the raw transaction.

Side by side#

Instruction dataProgram logs
Written bythe sender, before signingthe programs, during execution
Where it livesinside the transactionin the transaction's execution metadata
In raw shredsyesno
Showsthe operation and arguments requestedwhat the programs did and reported, including errors
Structurethe program's own binary layoutlines of text, some carrying base64 data
Size limitthe transaction size limit10,000 bytes per transaction by default in Agave, then cut off
Present for failed transactionsyesyes, up to the failure

What logs contain#

A transaction's log is a list of text lines. The runtime adds a line when each program is invoked, with its call depth, and when it finishes with success or failure and the compute it used. Programs add their own lines in between, such as Program log: Instruction: Swap, which many Anchor programs print as they enter an instruction. If a program fails, the last lines say why.

In two consecutive mainnet blocks we sampled on 18 November 2026, 778 of 781 transactions had logs, including every one of the 279 that failed. A failed transaction's log is often the only place its reason is written down.

Program data lines and Anchor events#

Some log lines are not prose. A line starting Program data: carries base64-encoded bytes written with the runtime's data-logging call, and Anchor's emit! uses exactly that to publish an event: the event's eight-byte discriminator followed by its fields. In our two sample blocks, 202 transactions carried 280 such lines. Decoding them is the same Borsh work as decoding instruction data, against the event definitions in the program's IDL; program events covers this, including the second event style that avoids logs altogether.

Log truncation#

Logs have a budget. Agave's log collector stops recording a transaction's log after 10,000 bytes by default and adds the line Log truncated; anything the programs printed after that is gone. None of the 781 sample transactions hit the limit, though the longest log came within about a hundred characters of it. Anchor's documentation also warns that some data providers truncate logs further, which is one reason it offers events that do not depend on logs.

Treat any log-derived field as possibly missing. A decoder that requires a certain log line will silently drop the transactions whose logs were cut.

Intent and outcome#

The two sources answer different questions. Instruction data says "swap exactly this much, accept no less than that"; the logs and the rest of the execution metadata say whether the swap ran, what the program reported and, through events, often the amounts that actually moved. Use instruction data to understand what someone tried to do and logs to learn what happened. A transaction that landed but failed shows the gap at its widest: perfectly valid instruction data, and a log ending in an error.

Why a shred decoder has only one of the two#

Raw shreds carry the transactions as the leader broadcast them, and they reach you before any record of their execution does. Instruction data is inside the transaction; the logs reach you only later, with the execution metadata. So a shred decoder works from instruction data alone and gets logs later from RPC or another executed source. Inner instructions are in the same situation, and so are balances and the success flag. Some useful values are in the instruction data from the start: a Pyth price, for example, travels inside the update instruction, as oracle updates on Solana shows.

Questions about logs and instruction data#

Are program logs in raw Solana transactions?#

No. Logs are produced during execution and stored in the transaction's metadata, not in the signed transaction.

Can logs be cut off?#

Yes. Agave stops recording after 10,000 bytes per transaction by default and adds "Log truncated".

Which should I index, logs or instruction data?#

Both, for different fields: instruction data for what was requested, logs and events for what happened. Only instruction data is available the moment a transaction appears in shreds.

Where each source falls short#

Instruction data cannot report outcomes, amounts actually moved or errors. Logs can be truncated, are free-form text outside of data lines, differ between program versions and are absent until execution. Neither alone describes a transaction completely; the map of data sources shows which source carries which field, and webhooks or shreds compares services that hand you the logs already parsed.

Using both#

Decode instruction data as transactions arrive, with the stages in the decoding pipeline, then attach logs once RPC has them. Instruction data explains the format you start from, and the quickstart runs a first decode on live shreds.

Sources#

Raw shreds on your own server

Ultra Low Latency Shreds is $200 and Standard Shreds is $100. You pay in crypto, tell us which IPv4 address and UDP port should receive the stream, and we wire it up by hand.