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

feat(trace): callTracer add revert reason #904

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jsvisa
Copy link
Contributor

@jsvisa jsvisa commented Nov 30, 2024

Description

backport from go-ethereum, add revertReason for the callTracers

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also
list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • Go Version:
  • Hardware:
  • Docker Version:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • New and existing E2E tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have not added any vulnerable dependencies to my code

@jsvisa jsvisa requested a review from a team as a code owner November 30, 2024 03:03
@jsvisa jsvisa force-pushed the trace-call-revertReason branch from dcfebfe to a7f3a46 Compare December 7, 2024 02:56
@jsvisa
Copy link
Contributor Author

jsvisa commented Dec 7, 2024

@freemanzMroj @otherview PTAL, thanks.

@otherview
Copy link
Member

Hey @jsvisa thank you for the collaboration, but the team ruled out this PR, the reason being that the team decided it's preferable to leave revert reason interpretation to the contract consumer (user).

If you feel strongly about this, please raise an issue, and we can kickoff a more broad discussion.
Many thanks!

@jsvisa
Copy link
Contributor Author

jsvisa commented Dec 10, 2024

Hi @otherview this field is backported from go-ethereum https://github.com/ethereum/go-ethereum/blob/08e6bdb550712503873fb2a138b30132cc36c481/eth/tracers/native/call.go#L59

Hey @jsvisa thank you for the collaboration, but the team ruled out this PR, the reason being that the team decided it's preferable to leave revert reason interpretation to the contract consumer (user).

As the output is byte encoded, I think the decoded string should be more readable for the consumers to identify why the tx was failed or call failure.

Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
@jsvisa jsvisa force-pushed the trace-call-revertReason branch from a7f3a46 to 9498601 Compare December 23, 2024 21:53
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