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

fix(tracing): align trace output with geth #198

Merged
merged 2 commits into from
Sep 14, 2024

Conversation

pythonberg1997
Copy link
Contributor

  1. The error msg should not be converted to parity style in callTracer. They should only be converted in flatCallTracer which is not supported by reth now.
  2. The gasUsed should be the gasLimit when there's a not reverted error.
  3. The call_frame.to should be None if the call type is Create/Create2 and it failed.

Related geth code:

Copy link
Contributor

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

ty, all of these look correct

Comment on lines +143 to +146
InstructionResult::InvalidFEOpcode => {
if kind.is_parity() { "Bad instruction" } else { "invalid opcode: INVALID" }
.to_string()
}
Copy link
Contributor

Choose a reason for hiding this comment

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

@mattsse mattsse merged commit ac15221 into paradigmxyz:main Sep 14, 2024
11 checks passed
lwedge99 pushed a commit to sentioxyz/revm-inspectors that referenced this pull request Oct 8, 2024
1. The error msg should not be converted to parity style in
`callTracer`. They should only be converted in `flatCallTracer` which is
not supported by reth now.
2. The `gasUsed` should be the `gasLimit` when there's a not reverted
error.
3. The `call_frame.to` should be None if the call type is
`Create/Create2` and it failed.

Related geth code: 
*
https://github.com/ethereum/go-ethereum/blob/a9523b6428238a762e1a1e55e46ead47630c3a23/eth/tracers/native/call_flat.go#L226
*
https://github.com/ethereum/go-ethereum/blob/a9523b6428238a762e1a1e55e46ead47630c3a23/core/vm/evm.go#L254
*
https://github.com/ethereum/go-ethereum/blob/a9523b6428238a762e1a1e55e46ead47630c3a23/eth/tracers/native/call.go#L88

---------

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
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.

2 participants