-
Notifications
You must be signed in to change notification settings - Fork 94
fix: align revert reason with go ethereum that expects hex-encoded result #289
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
Conversation
Hey @mmsqe could you provide more context on this - why is this being reverted? |
Hi @mmsqe! To add some context, I do believe that PR#224 was necessary. The part I incorrectly modified appears to be the handling of the return data in the JSON-RPC layer, where the return data became not hex-encoded. The issue that PR#224 aimed to address was, more precisely, that when a precompile is invoked via a caller contract, the revert reason was not included in the return data, making it impossible to decode. [ref: #223 ] The root cause was that the precompile, upon encountering an error, was returning it in a way that differed from how Geth’s
Although this diverged from the Geth interpreter’s behavior, it didn’t cause any issues when the precompile was invoked directly. However, when the precompile is called from within a contract, the revert reason does not get correctly passed along to opRevert, resulting in its loss. The key changes I made were as follows:
From what I can see in your modifications, the issue doesn't seem to stem from these parts. That said, if I’ve misunderstood anything, I’d greatly appreciate your clarification! |
Upon reviewing PR#224 again at this point, it seems that setting the EVM interpreter's Would you be able to remove that section in this PR? |
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.
LGTM! Really appreciate your contribution!
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.
LGTM with a small nit
Description
data
get duplicatedCloses: #XXXX
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
main
branchReviewers Checklist
All items are required.
Please add a note if the item is not applicable
and please add your handle next to the items reviewed
if you only reviewed selected items.
I have...
Unreleased
section inCHANGELOG.md