Skip to content

Commit 6224044

Browse files
bshastryclaude
andcommitted
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 6224044

File tree

1 file changed

+368
-48
lines changed

1 file changed

+368
-48
lines changed

0 commit comments

Comments
 (0)