feat: add system transaction inspection support#2808
Merged
rakita merged 12 commits intobluealloy:mainfrom Jul 29, 2025
Merged
Conversation
Contributor
Author
|
tested with a system call in bera-reth and its working as intended (after updating alloy-evm + bera-reth ofc). The following tx is executed as a system tx, and is now traceable. curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"debug_traceTransaction","params":["0xf13ff9cde2232ffece74532fc34110eaa38bb01d8cba415c9eba8390319030b6",{"tracer":"callTracer"}],"id":1}' \
http://localhost:8545/ | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1097 100 935 100 162 11553 2001 --:--:-- --:--:-- --:--:-- 13712
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"from": "0xfffffffffffffffffffffffffffffffffffffffe",
"gas": "0x1000000",
"gasUsed": "0x42d9",
"to": "0x4200000000000000000000000000000000000042",
"input": "0x60644a6b000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000309070f3f3d1ef0bd7e3186f7945261291d9363005eb126c64660daec91d51514bbcc50e8fb1d0f632bad82f2901e43d7600000000000000000000000000000000",
"calls": [
{
"from": "0x4200000000000000000000000000000000000042",
"gas": "0x1c27be0",
"gasUsed": "0x19f0",
"to": "0x4200000000000000000000000000000000000043",
"input": "0x999da65b000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000309070f3f3d1ef0bd7e3186f7945261291d9363005eb126c64660daec91d51514bbcc50e8fb1d0f632bad82f2901e43d7600000000000000000000000000000000",
"value": "0x0",
"type": "CALL"
}
],
"value": "0x0",
"type": "CALL"
}
} |
CodSpeed Performance ReportMerging #2808 will not alter performanceComparing Summary
|
rakita
reviewed
Jul 28, 2025
crates/inspector/src/inspect.rs
Outdated
| /// | ||
| /// Similar to [`InspectEvm::inspect_one_tx`] but for system calls. | ||
| /// Uses [`SYSTEM_ADDRESS`] as the caller. | ||
| fn inspect_system_call_one( |
Member
There was a problem hiding this comment.
Inspection naming is inspect_one_tx so it would be nicer for this to be inspect_one_system_call
rakita
reviewed
Jul 28, 2025
crates/inspector/src/inspect.rs
Outdated
| /// Inspect a system call with the current inspector and a custom caller. | ||
| /// | ||
| /// Similar to [`InspectEvm::inspect_one_tx`] but for system calls with a custom caller. | ||
| fn inspect_system_call_with_caller_one( |
Member
There was a problem hiding this comment.
inspect_one_system_call_with_caller
rakita
reviewed
Jul 28, 2025
crates/inspector/src/inspect.rs
Outdated
| /// Inspect a system call with a given inspector. | ||
| /// | ||
| /// Similar to [`InspectEvm::inspect_one`] but for system calls. | ||
| fn inspect_system_call_with_inspector_one( |
Member
There was a problem hiding this comment.
Suggested change
| fn inspect_system_call_with_inspector_one( | |
| fn inspect_one_system_call_with_inspector( |
…ttern - inspect_system_call_one -> inspect_one_system_call - inspect_system_call_with_caller_one -> inspect_one_system_call_with_caller - inspect_system_call_with_inspector_one -> inspect_one_system_call_with_inspector
- Implement InspectSystemCallEvm trait for OpEvm - Add inspect_one_system_call_with_caller method - Add comprehensive test for system call inspection functionality
- Remove unnecessary custom bytecode setup - Use default context for cleaner test
- Format import statements in exec.rs - Fix whitespace formatting in test functions - Ensure consistent code style across files
This reverts commit fba9ceb.
rakita
approved these changes
Jul 29, 2025
Closed
This was referenced Jul 30, 2025
Closed
Closed
Closed
Closed
Closed
Merged
lwedge99
pushed a commit
to sentioxyz/revm
that referenced
this pull request
Sep 16, 2025
* att1 * cargo fmt * reduce test bloat * remove InspectSystemCallCommitEvm * fix: rename system call inspection methods to match inspect_one_tx pattern - inspect_system_call_one -> inspect_one_system_call - inspect_system_call_with_caller_one -> inspect_one_system_call_with_caller - inspect_system_call_with_inspector_one -> inspect_one_system_call_with_inspector * feat: add system call inspection support to op-revm - Implement InspectSystemCallEvm trait for OpEvm - Add inspect_one_system_call_with_caller method - Add comprehensive test for system call inspection functionality * fix: simplify system call inspection test - Remove unnecessary custom bytecode setup - Use default context for cleaner test * style: fix code formatting for CI - Format import statements in exec.rs - Fix whitespace formatting in test functions - Ensure consistent code style across files * trigger ci * Revert "trigger ci" This reverts commit fba9ceb.
theochap
pushed a commit
to ethereum-optimism/optimism
that referenced
this pull request
Jan 21, 2026
* att1 * cargo fmt * reduce test bloat * remove InspectSystemCallCommitEvm * fix: rename system call inspection methods to match inspect_one_tx pattern - inspect_system_call_one -> inspect_one_system_call - inspect_system_call_with_caller_one -> inspect_one_system_call_with_caller - inspect_system_call_with_inspector_one -> inspect_one_system_call_with_inspector * feat: add system call inspection support to op-revm - Implement InspectSystemCallEvm trait for OpEvm - Add inspect_one_system_call_with_caller method - Add comprehensive test for system call inspection functionality * fix: simplify system call inspection test - Remove unnecessary custom bytecode setup - Use default context for cleaner test * style: fix code formatting for CI - Format import statements in exec.rs - Fix whitespace formatting in test functions - Ensure consistent code style across files * trigger ci * Revert "trigger ci" This reverts commit fba9ceb361ea25c0564b92ed1bef992de7f6a7a3.
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.
Adds inspection support for system transactions to enable tracing with debug_traceTransaction and debug_traceBlock APIs.
Changes
Closes #2798