-
Notifications
You must be signed in to change notification settings - Fork 819
feat: add system transaction inspection support #2808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add system transaction inspection support #2808
Conversation
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to be added to op-revm
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( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inspection naming is inspect_one_tx
so it would be nicer for this to be inspect_one_system_call
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( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inspect_one_system_call_with_caller
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( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
* 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.
Adds inspection support for system transactions to enable tracing with debug_traceTransaction and debug_traceBlock APIs.
Changes
Closes #2798