eth_call gasLimit param - different behavior compared to spec
macfarla opened this issue · comments
Different behavior on eth_call compared with geth. Originally reported via linea Consensys#41
workaround is to omit the gasLimit param from eth_call and rely on gas param
Currently transitioning the linea mainnet nodes using geth binary to besu binary and discovered an issue regarding the accepted parameters for the eth_call method (reference here: https://besu.hyperledger.org/public-networks/reference/api/objects#transaction-call-object:~:text=Parameter%20for%20eth_call%2C%20eth_createAccessList%2C%20and%20eth_estimateGas.) It looks like gasLimit is not accepted in the besu binary.
The issue seems to be that the besu binary doesn't support the same parameters for eth_call as the geth binary, as proven with the following request which works on the node running geth and fails on the one with besu. Below I've attached the request and the expected answer (from the geth node), and the error from the linea node running besu.
curl https://linea-mainnet.public.blastapi.io -H "Content-Type: application/json" -d '{ "jsonrpc": "2.0", "method": "eth_call", "params": [{ "data": "0x535b355c000000000000000000000000cebb9d8349a793439a5f9002934688698783eb740000000000000000000000000000000000000000000000000000f65ad6215c00", "from": "0xaf8ae6955d07776ab690e565ba6fbc79b8de3a5d", "to": "0xcf68a2721394dcf5dcf66f6265c1819720f24528", "gas": "0x15522", "gasLimit": "0x15522", "value": "0x0" }, "latest"], "id": 1 }'
Output from the geth node:
{"jsonrpc":"2.0","id":1,"result":"0x"}
Output from the besu node:
{"jsonrpc":"2.0","id":1,"error":{"code":-32602,"message":"Invalid params"}}
It seems that if I remove the gasLimit parameter when sending the request to the linea node with besu binary it works and provides the expected output. Any suggestions? Thanks