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

gasLimit parameter for eth_call #41

Open
AntonieDavid opened this issue Jul 3, 2024 · 2 comments
Open

gasLimit parameter for eth_call #41

AntonieDavid opened this issue Jul 3, 2024 · 2 comments
Assignees

Comments

@AntonieDavid
Copy link

Currently trnsitioning 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

@usmansaleem
Copy link

@AntonieDavid This issue in Besu will be fixed through PR hyperledger#7323. However, during my research, I found out that gasLimit in transaction param is ignored in Geth, the gas is used instead as gas limit (both in Geth and Besu). In Besu it was failing due to JSON serialization of unknown fields involving hex literal values. Just wanted to let you know if you mistakenly relying on gasLimit in eth_call.

@usmansaleem usmansaleem self-assigned this Jul 16, 2024
@usmansaleem
Copy link

The PR fixing this issue has been merged.

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