-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Description
Description
This ticket tracks an inconsistency observed when calling eth_estimateGas through the Relay (https://testnet.hashio.io/api). The behavior changes depending on whether the value field is included in the request payload. This discrepancy originates from different responses returned by the Mirror Node, but results in inconsistent handling within the Relay.
Steps to Reproduce
Request without value:
curl https://testnet.hashio.io/api/ \
-X POST \
-H "Content-Type: application/json" \
--data '{
"method": "eth_estimateGas",
"params": [{
"from": "0x743b4e1010671579CEC58f0932Bdac1f94F99847",
"to": "0x0000000000000000000000000000000000644921",
"data": "0xa9059cbb000000000000000000000000b99bdacec66c5cea3448ac561dfb498a26ffac150000000000000000000000000000000000000000000000000000000000000001"
}],
"id": 1,
"jsonrpc": "2.0"
}'Behavior:
- The Relay receives a
BAD_REQUESTfrom the Mirror Node with messageCONTRACT_REVERT_EXECUTED. - The Relay interprets this as a revert and returns a JSON-RPC error with code 3.
Request with value:
curl https://testnet.hashio.io/api/ \
-X POST \
-H "Content-Type: application/json" \
--data '{
"method": "eth_estimateGas",
"params": [{
"from": "0x743b4e1010671579CEC58f0932Bdac1f94F99847",
"to": "0x0000000000000000000000000000000000644921",
"data": "0xa9059cbb000000000000000000000000b99bdacec66c5cea3448ac561dfb498a26ffac150000000000000000000000000000000000000000000000000000000000000001",
"value": "0x1"
}],
"id": 1,
"jsonrpc": "2.0"
}'Behavior:
- The Mirror Node returns a different error message:
LOCAL_CALL_MODIFICATION_EXCEPTION. - The Relay falls back to
predefinedGasForTransaction()and returns an estimated gas value instead of an error.
Impact
The Relay produces inconsistent results for otherwise equivalent eth_estimateGas requests depending on the presence of the value field. Although this behavior stems from Mirror Node differences, it affects downstream clients relying on consistent gas estimation results.
Tracking Actions
- Track this issue until the Mirror Node resolves the equivalent issue Mirror Node returns inconsistent responses for
contracts/callwhenvaluefield is omitted hiero-mirror-node#12156 - Consider normalizing handling within the Relay to ensure predictable behavior for
eth_estimateGascalls regardless of Mirror Node message type. - Re-test once the Mirror Node fix is confirmed.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request