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

"Invalid params" response to eth_call #2251

Closed
ligi opened this issue May 8, 2021 · 6 comments
Closed

"Invalid params" response to eth_call #2251

ligi opened this issue May 8, 2021 · 6 comments
Labels

Comments

@ligi
Copy link

ligi commented May 8, 2021

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"}
@macfarla
Copy link
Contributor

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"
  }
}

@sajz
Copy link
Contributor

sajz commented Jun 1, 2021

@ligi - did @macfarla rec fixed the issue?
closing for now, reopen if still an issue.

@sajz sajz closed this as completed Jun 1, 2021
@samsondav
Copy link

This is not fixed. We still get this intermittently when trying to send transactions.

@macfarla
Copy link
Contributor

macfarla commented Aug 4, 2022

@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?

@jflo
Copy link
Contributor

jflo commented Aug 8, 2022

I got the same results @macfarla did, and am unable to reproduce the issue without more information.

@macfarla
Copy link
Contributor

closing this one - let us know more information (as requested above) if you're still having a problem @samsondav

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants