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

UTF8 Replacement bytes "EFBFBD" in Revert error reason #80

Open
vicnaum opened this issue Nov 25, 2022 · 1 comment
Open

UTF8 Replacement bytes "EFBFBD" in Revert error reason #80

vicnaum opened this issue Nov 25, 2022 · 1 comment

Comments

@vicnaum
Copy link

vicnaum commented Nov 25, 2022

Unable to decode the revert error from Simulation (and probably from real txs too).

What I've noticed when I decode the revert string to HEX, is that it contains a lot of "EFBFBD" bytes:
image

"EFBFBD" is used as a standard UTF8 replacement bytes if the source byte cannot be encoded into UTF8:
https://blog.gdssecurity.com/labs/2015/2/18/when-efbfbd-and-friends-come-knocking-observations-of-byte-a.html

image

As you can see it couldn't encode 9C.

If you replace EFBFBD with any random byte (like "FF") - then you have a proper length ABI-Encoded custom error (with 4 bytes in the beginning, and 32+32 bytes two uints after).

I'm not sure where this replacement happens - on the Ethers side (in fetchJson they use toUTF8 encoding) or on Flashbots Relay side.

But if it happens on Ether's side - maybe we can use another connector?

@rori4
Copy link

rori4 commented Feb 19, 2023

can confirm I am also facing this issue. Was struggling to understand why that is but this issue seems to be on point of my conclusion as well.

Can we bump this? It's pretty frustrating not being able to get the correct return bytes of a transaction and corrupt the result. Although I am pretty sure that's coming from the backend relay and its not an issue with this package

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

No branches or pull requests

2 participants