Skip to content

fix(inspector): forward EIP-7708 transfer logs to the inspector - #3816

Merged
rakita merged 3 commits into
mainfrom
backport/eip7708-inspector-logs
Jul 23, 2026
Merged

rakita merged 3 commits into
mainfrom
backport/eip7708-inspector-logs

Conversation

@rakita

@rakita rakita commented Jul 22, 2026

Copy link
Copy Markdown
Member

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 to Inspector::log, so inspectors silently missed them.

Fix

inspect_eip7708_transfer_logs replays the journal logs appended since a pre-step / pre-frame index and forwards the ones matching ETH_TRANSFER_LOG_ADDRESS + ETH_TRANSFER_LOG_TOPIC. It is called from the non-LOG* branch of the instruction loop and from all three paths of inspect_frame_init.

Tests

Two new tests, test_eip7708_tx_value_transfer_log_is_inspected and test_eip7708_selfdestruct_transfer_log_is_inspected. Both fail on main with 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.

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]>
@codspeed

codspeed Bot commented Jul 22, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 181 untouched benchmarks
⏩ 1 skipped benchmark1


Comparing backport/eip7708-inspector-logs (3d3b3fb) with main (bb518a0)

Open in CodSpeed

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports. ↩

rakita added 2 commits July 22, 2026 21:23
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.
@rakita
rakita merged commit d00704d into main Jul 23, 2026
34 checks passed
@rakita
rakita deleted the backport/eip7708-inspector-logs branch July 23, 2026 08:57
@github-actions github-actions Bot mentioned this pull request Jul 23, 2026
RealiCZ added a commit to megaeth-labs/revm that referenced this pull request Sep 16, 2026
@RealiCZ RealiCZ mentioned this pull request Sep 18, 2026
43 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant