ethereum / ethereum/execution-specs

feat(fw): add pretty printing of vm traces

Open
#1,486 6 comments 0 reactions 0 assignees View on GitHub
A-test-fill C-feat E-easy P-medium stale
Dominant language
Python
Stars
1.2k
Forks
505
Avg merge
2d 14h
Merged PRs (30d)
116

Description

Currently, `fill --traces -s` does print vm traces to the terminal if a test fails (note `-s` to prevent pytest from capturing stdout), but they're rather ugly. It'd be nice to have a more compact pretty print of these traces.

For example (assuming the test has been modified to fail upon filling):
```console
fill tests/berlin/eip2930_access_list/ --fork Berlin --evm-dump-dir=/tmp/evm-dump --traces -s
```
Screenshot:
![image](https://github.com/ethereum/execution-specs/assets/91727015/06a30d37-2b87-4dbd-a244-52fb1e79c2bd)

Here's an example of a clean trace representation from retesteth:
![image](https://github.com/ethereum/execution-specs/assets/91727015/10e2f8fe-2985-4ead-bf33-28298ebad12d)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.