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

eth_call gasLimit param - different behavior compared to spec #7294

Closed
macfarla opened this issue Jul 3, 2024 · 0 comments · Fixed by #7323
Closed

eth_call gasLimit param - different behavior compared to spec #7294

macfarla opened this issue Jul 3, 2024 · 0 comments · Fixed by #7323
Assignees
Labels
bug Something isn't working P2 High (ex: Degrading performance issues, unexpected behavior of core features (DevP2P, syncing, etc)) RPC

Comments

@macfarla
Copy link
Contributor

macfarla commented Jul 3, 2024

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

@macfarla macfarla added bug Something isn't working P2 High (ex: Degrading performance issues, unexpected behavior of core features (DevP2P, syncing, etc)) RPC labels Jul 3, 2024
@macfarla macfarla assigned lu-pinto and unassigned lu-pinto Jul 4, 2024
@usmansaleem usmansaleem self-assigned this Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2 High (ex: Degrading performance issues, unexpected behavior of core features (DevP2P, syncing, etc)) RPC
Projects
None yet
3 participants