In this track: Read logs and failures
advanced · 4 MIN READ

Why reverted logs do not persist

Rollback removes logs from the reverted execution scope.

LET’S PICTURE IT

Notes made during an abandoned attempt are discarded with that attempt.

SEE IT FOR YOURSELF
From an emitted Transfer event to a receipt logStep 1 / 4
From an emitted Transfer event to a receipt logToken executionApply coded rulesUpdate relevant balancesEmit Transferfrom · to · valueA structured logA reverted execution portion does not keep its emitted logsTransfer(address,address,uint256)Topic 0: 0xddf252ad…b3efFull digest · 32 bytesEvent topic zero and a function selector use different lengthsTopic 1from addressIndexedTopic 2to addressIndexedDataraw valueNot indexedThis diagram is specifically the common ERC-20 Transfer layoutReceipt logTopics + dataBlock contextApplication viewDecoded fieldsImplementation still mattersThe local event tool does not query or authenticate a deployed token

A token implementation may update balances and emit its standard Transfer event. State and the emitted record are related but distinct.

Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.

Track the emitting scope

A contract may emit a log before a later condition fails. Reverting that call scope removes its state changes and the logs created within that reverted scope.

Follow propagation to the top

If failure propagates through the entire transaction execution, none of its execution logs survive as successful receipt logs. Consumed gas is still charged under fee rules.

Handle caught child failures

A caller can catch a child failure and continue. Logs from the reverted child disappear, while the successful caller can retain its own logs if its surrounding execution succeeds.

Separate debugging evidence

A trace or local simulation may show a LOG instruction attempted before rollback. That debugging observation is different from a surviving on-chain receipt log.

Inspect the example

Caller emits A
Child emits B, then reverts
Caller catches failure, emits C, and succeeds

Surviving logs: A, C
Discarded log: B

A simplified call sequence; the outcome depends on the caller actually catching and successfully finishing.

TURN UNDERSTANDING INTO PRACTICEOpen the Event decoder →
QUICK CHECK · NO PRESSURE

Can a trace show an attempted log that the receipt does not retain?

Your progress stays in this browser.
Keep exploring the original referenceSolidity documentation ↗

Original explanations by EtherTools. Examples are educational and source-linked; this site is independent of the Ethereum Foundation. Our approach.