eth_call
and eth_estimateGas
only return encoded revert reason
#5705
Labels
eth_call
and eth_estimateGas
only return encoded revert reason
#5705
Description
When
eth_call
oreth_estimateGas
result inexecution reverted
the error response contains the reason for the revert, ABI-encoded in thedata
field, e.g.Other clients (Quorum is the specific example I've tried) return the ABI-decoded reason as well. This is particularly convenient for reading revert reasons from application-side logs since a capture of the JSON/RPC flows can show you the cause of a problem without needing to decode the error. Given that the ABI-encoded reason is available it's a very small CPU overhead to perform the conversion in Besu, and the additional network traffic is pretty minimal as well.
Acceptance Criteria
Submit an
eth_call
oreth_estimateGas
that causes execution reverted. The ABI-decoded text is included in themessage
part of the error response, after the "Execution reverted" prefix. The ABI-encodeddata
field is also included in the response. If there is no revert reason available, themessage
field remains as "Execution reverted" which is the existing behaviour.The text was updated successfully, but these errors were encountered: