-
Notifications
You must be signed in to change notification settings - Fork 985
Commit 6224044
Add transaction tracing support to block test command
Implements tracing functionality for the block-test subcommand in evmtool,
allowing developers to debug block test execution with detailed transaction
traces including opcodes, gas usage, stack, and memory state.
New feature:
- Added -t/--trace flag to enable tracing during block test execution
- Integrated with existing TracerManager and StandardJsonTracer infrastructure
- Traces are output to stderr in JSON format compatible with go-ethereum
Implementation:
The processBlockWithTracing() method processes transactions with full tracing
while maintaining correct transaction status handling. Transactions are
categorized as INVALID, FAILED, or SUCCESSFUL per Ethereum protocol:
- INVALID transactions (wrong nonce, insufficient balance) reject the block
- FAILED transactions (reverted execution) are included with receipts
- SUCCESSFUL transactions are included with receipts
This distinction ensures blocks with reverted transactions are correctly
accepted, matching behavior of the standard block import path and reference
implementations like go-ethereum.
Usage:
evmtool block-test -t --trace-stack --trace-memory <test-file.json>
Tested with Ethereum reference test suite including complex scenarios with
failed transactions. Trace output format matches go-ethereum for compatibility
with existing tooling.
Signed-off-by: Bhargava Shastry <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
Signed-off-by: Bhargava Shastry <[email protected]>1 parent 5c2b26b commit 6224044Copy full SHA for 6224044
File tree
Expand file treeCollapse file tree
1 file changed
+368
-48
lines changedOpen diff view settings
Filter options
- ethereum/evmtool/src/main/java/org/hyperledger/besu/evmtool
Expand file treeCollapse file tree
1 file changed
+368
-48
lines changedOpen diff view settings
0 commit comments