Repository navigation
fix(inspector): forward EIP-7708 transfer logs to the inspector - #3816
Merged
Merged
Conversation
Backport of the inspector fix from #3796: journal logs emitted outside LOG* opcodes (EIP-7708 value-transfer logs from calls, tx value transfers and selfdestructs) were never handed to Inspector::log. Co-authored-by: 0xalpharush <[email protected]>
Merging this PR will not alter performance
Comparing Footnotes
|
Replace the LOG*-only inspect_log with inspect_step_logs, which forwards every log the instruction journaled since the pre-step index via log_full. This covers LOG* and the EIP-7708 transfer logs of value-moving instructions, and drops the stale-logs().last() guard in favour of exact index math. The frame-init paths keep the filtered, interpreter-less variant.
inspect_step_logs, inspect_step_logs_inner, inspect_eip7708_transfer_logs and is_eip7708_transfer_log collapse into inspect_logs, which forwards the logs journaled since logs_i via log_full when an interpreter is available and log otherwise. It is always cold: each call site keeps only the cheap journal-length check inline. The 7708 address/topic filter is dropped now that every journaled log is forwarded, which also flattens the branch chain in inspect_frame_init.
Closed
RealiCZ
added a commit
to megaeth-labs/revm
that referenced
this pull request
Sep 16, 2026
… transfer logs to the inspector (bluealloy#3816)
43 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of the inspector part of #3796 onto
main, where the bug is already present.Problem
Logs reach the journal from three places outside the
LOG*opcodes. Precompile logs were already forwarded to the inspector, but EIP-7708 transfer logs — emitted for call value transfers, the transaction value transfer, and selfdestruct — were never handed toInspector::log, so inspectors silently missed them.Fix
inspect_eip7708_transfer_logsreplays the journal logs appended since a pre-step / pre-frame index and forwards the ones matchingETH_TRANSFER_LOG_ADDRESS+ETH_TRANSFER_LOG_TOPIC. It is called from the non-LOG*branch of the instruction loop and from all three paths ofinspect_frame_init.Tests
Two new tests,
test_eip7708_tx_value_transfer_log_is_inspectedandtest_eip7708_selfdestruct_transfer_log_is_inspected. Both fail onmainwith only the test changes applied, and pass with the fix.Original PR #3796 is based on the glamsterdam devnet-7 branch and also carries selfdestruct fixes that are already on
main; only the EIP-7708 commit is backported here.Credit to @0xalpharush.