-
Notifications
You must be signed in to change notification settings - Fork 298
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
trace: Print gas and gasUsed in hex #592
Conversation
021f51c
to
c6996ad
Compare
Is this a requirement of the tracing format? |
425f64c
to
d421915
Compare
No. I just want to have it similar to geth to avoid unnecessary problems when comparing tests results. |
Never mind, apparently it is in the tracing EIP:
|
m_out << R"(,"gasUsed":)" << (ctx.start_gas - result.gas_left); | ||
m_out << R"(,"gas":)" << std::hex << "0x" << result.gas_left; | ||
m_out << R"(,"gasUsed":)" << std::hex << "0x" << (ctx.start_gas - result.gas_left) | ||
<< std::dec; | ||
m_out << R"(,"output":")" << evmc::hex({result.output_data, result.output_size}) << '"'; |
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.
Apparently this field is not an even listed as optional in the EIP, @chfast.
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.
I can remove it and check once again if we have it implemented according to spec, but let's first confirm with @chfast
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.
It is useful for debugging. Let's keep it.
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.
@chfast Approve please if no other comments.
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.
Can one of you open a PR to the EIP adding output
as an optional field? Not blocking this PR, just as an addition.
d421915
to
59540a1
Compare
No description provided.