"Invalid params" response to eth_call
ligi opened this issue · 6 comments
I am always getting "Invalid params" as response to eth_call - even for the example stated in the besu documentation (https://besu.hyperledger.org/en/stable/Reference/API-Methods/#eth_call)
$ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13","value":"0x1"}, "latest"],"id":53}' http://3.12.166.199:8545
{
"jsonrpc" : "2.0",
"id" : 53,
"error" : {
"code" : -32602,
"message" : "Invalid params"
}
}
$ curl -X POST H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}' http://3.12.166.199:8545
{
"jsonrpc" : "2.0",
"id" : 1,
"result" : "besu/970c594/v21.1.6-dev-3ddd1290/linux-x86_64/oracle_openjdk-java-11"
}
the same call to a geth node works:
$ curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13","value":"0x1"}, "latest"],"id":53}' http://10.10.42.123:8545
{"jsonrpc":"2.0","id":53,"result":"0x"}
$ curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}' http://10.10.42.123:8545
{"jsonrpc":"2.0","id":1,"result":"Geth/v1.10.2-stable-97d11b01/linux-amd64/go1.16"}
This should definitely work. Here is what I get:
$ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13","value":"0x1"}, "latest"],"id":53}' http://localhost:8545
{
"jsonrpc" : "2.0",
"id" : 53,
"result" : "0x"
}
My besu version:
$ curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}' http://localhost:8545
{
"jsonrpc" : "2.0",
"id" : 1,
"result" : "besu/v21.1.6-dev-2862ec7e/osx-x86_64/oracle_openjdk-java-11"
}
Do other methods work? Can you call this method to get enabled RPCs:
$ curl -X POST --data '{"jsonrpc":"2.0","method":"rpc_modules","params":[],"id":1}' http://127.0.0.1:8545
{
"jsonrpc" : "2.0",
"id" : 1,
"result" : {
"eea" : "1.0",
"txpool" : "1.0",
"debug" : "1.0",
"perm" : "1.0",
"eth" : "1.0",
"web3" : "1.0",
"admin" : "1.0",
"priv" : "1.0",
"net" : "1.0",
"miner" : "1.0"
}
}
This is not fixed. We still get this intermittently when trying to send transactions.
@samsondav can you be more specific - that would help us a lot!
What are you sending exactly when you get the error? What is the exact error message? What besu version are you using?
I got the same results @macfarla did, and am unable to reproduce the issue without more information.
closing this one - let us know more information (as requested above) if you're still having a problem @samsondav