besu: Intermittent 400 Bad Request when sending a transaction

We are seeing intermittent errors trying to send transactions on Besu (consensus client - teku). It only occurs on some RPC nodes and not all the time.

We are using eth_sendRawTransaction call.

Occasionally, we see this response:

400 Bad Request: {\n \"jsonrpc\" : \"2.0\",\n \"id\" : 60246,\n \"error\" : {\n \"code\" : -32602,\n \"message\" : \"Invalid params\"\n }\n}

This is a blocker for us to run Chainlink on Besu. We need reliable transaction sending.

Could be related to this issue? https://github.com/hyperledger/besu/issues/2251

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 18 (10 by maintainers)

Most upvoted comments

@samsondav Could you try to reproduce it with the latest release that’s coming out soon? V.23.1.0.?

please note with https://github.com/hyperledger/besu/pull/4965 the default max batch size changes to 1, you can increase this using the CLI option if required.

so you would get a message with the invalid call eg 2023-01-18 12:17:15.406+10:00 | vert.x-worker-thread-15 | DEBUG | JsonRpcExecutor | JSON-RPC request -> eth_call [{"data":"0x6d4ce63clkj","to":"0x9a3DBCa554e9f6b9257aAa24010DA8377C57c17e","gas":"0x2faf080"},"latest",null]

Also - in #4510 we added more detail at DEBUG level for Invalid params. If you can turn logging up to debug (even just for jsonrpc) and send us the log - that would help us diagnose.

This is still a blocker for Chainlink. We cannot use Besu because of this bug. To reproduce, send literally any transaction with a contract call and do it over and over again. Eventually you will hit this.

I am also seeing this behavior intermittently on our private 4 node QBFT network. We load test ~10,000 transactions of the same contract interaction type, and we see about 4 of these 400 Invalid params error returned.

"rawTx": {
    "type": "0x0",
    "nonce": "0x5f32",
    "gasPrice": "0x3e8",
    "maxPriorityFeePerGas": null,
    "maxFeePerGas": null,
    "gas": "0x271b8",
    "value": "0x0",
    "input": "0xb660892c00000000000000000000000076113240ed0f339d9552357d10270b7247c452050000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002463656562313766622d653466302d343838642d616261622d616538636265353139356464000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "v": "0x0",
    "r": "0x0",
    "s": "0x0",
    "to": "0x68c30c87759db789f798cbd7689f6107250a572a",
    "hash": "0xec5832268822547cd2de314240fae26be88951754b63f03e06cd02e7d609fba5"
  },

  "error": "400 Bad Request: {\n  \"jsonrpc\" : \"2.0\",\n  \"id\" : 8240,\n  \"error\" : {\n    \"code\" : -32602,\n    \"message\" : \"Invalid params\"\n  }\n}",
  

We are running Besu v10.22.0

I use 4G wireless module to post the eth_sendRawTransaction:this error {\n "jsonrpc" : "2.0",\n "id" : 60246,\n "error" : {\n "code" : -32602,\n "message" : "Invalid params"\n }\n} occured many times。

when error occured,I use metamask to send a Transaction using same wallet address,then the 4G wireless module can send data to besu with the same wallet address.

In response to the above situation, this happens to my program from time to time, but after I use the metamask wallet to send data once, my original program can work again. (my program works the same as metamask)

I’m going to play go-between here. “Literally just send any transaction” … I assume if you just send enough tx, do include those that call contracts, you’ll see the issue.

Can you provide an example call please? A curl statement would be fine.