-
Notifications
You must be signed in to change notification settings - Fork 21.4k
cmd/evm: add stdin support to blocktest command #32824
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
base: master
Are you sure you want to change the base?
Conversation
Enable blocktest to read filenames from stdin when no path argument is provided, matching the existing statetest behavior. This allows efficient batch processing of blockchain tests. Usage: - Single file: evm blocktest <path> - Batch mode: find tests/ -name "*.json" | evm blocktest 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
The lint is red @bshastry |
9d2a754
to
0e8268a
Compare
0e8268a
to
94b4de0
Compare
Been looking a bit into this. Its seems the whole concept of EndMarker should be removed. What I guess you want is to write out the results between the traces not only at the end of the test, right? This should be possible with the traceResult struct. I will push a commit on top which changes this, we can remove it again if you don't agree |
Yeah, basically I want a read protocol for jsonl that signals when blocktest results are complete, so I can break the jsonl scanner loop. trace line 1 trace line 2... |
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.
LGTM
This commit addresses all feedback from @rjl493456442: 1. Result printing location: Removed duplicate report() call from inside test loop. Now uses dedicated traceEndMarker on stderr instead of printing full results mid-execution. 2. Fork assignment: Fork now always assigned regardless of tracer or pass/fail status. Root only assigned when test succeeds, following correct semantics. 3. Log suppression: Removed automatic log suppression. Users can control logging via standard --verbosity and --log.file flags. Only one rare INFO log exists in blocktest path. The traceEndMarker provides clear delimiter for trace parsers (e.g., goevmlab) without duplicating test results. Format: {"testEnd":{"name":"...","pass":true,"fork":"...","root":"..."}} This follows precedent from Nethermind PR ethereum#9432. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Enable blocktest to read filenames from stdin when no path argument is provided, matching the existing statetest behavior. This allows efficient batch processing of blockchain tests.
Usage:
🤖 Generated with Claude Code