Skip to content
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

eth/tracers/logger: improve markdown logger #30805

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

holiman
Copy link
Contributor

@holiman holiman commented Nov 25, 2024

This PR improves the output of the markdown logger a bit.

  • Remove RStack field,
  • Move Stack last, since it may have very large vertical expansion
  • Make the pre- and post-exec metadata structured into a bullet-list

using the command go run ./cmd/evm/ --json --code 604019 run, with a hack to enable the markdown-output, here is the before (current master) and after (this PR).

Before

From: 0x000000000000000000000000000073656E646572
To: 0x0000000000000000000000007265636569766572
Data: ``
Gas: 10000000000
Value `0` wei

Pc Op Cost Stack RStack Refund
0 PUSH1 3 [] 0
2 NOT 3 [0x40] 0
3 STOP 0 [0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf] 0

Output: ``
Consumed gas: 6
Error: ``

After

Pre-execution info:

  • from: 0x000000000000000000000000000073656E646572
  • to: 0x0000000000000000000000007265636569766572
  • data: ``
  • gas: 10000000000
  • value: 0 wei
Pc Op Cost Refund Stack
0 PUSH1 3 0 []
2 NOT 3 0 [0x40]
3 STOP 0 0 [0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf]

Post-execution info:

  • output: ``
  • consumed gas: 6
  • error: <nil>

@holiman holiman requested a review from s1na as a code owner November 25, 2024 10:16
Copy link
Contributor

@s1na s1na left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@holiman holiman added this to the 1.14.13 milestone Nov 25, 2024
@holiman holiman merged commit 02159d5 into ethereum:master Nov 25, 2024
3 checks passed
@fjl fjl modified the milestones: 1.14.13, 1.15.0 Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants