hashgraph / hedera-json-rpc-relay

Implementation of Ethereum JSON-RPC APIs for Hedera
Apache License 2.0
67 stars 70 forks source link

Large calldata in eth_sendRawTransaction causes a `timeout exceeded` error #3174

Open thusaras-vc opened 6 days ago

thusaras-vc commented 6 days ago

Description

Making calls to eth_sendRawTransaction with large calldata (i.e. 12+ kB) return the following error:

  1. There are several internal calls to /transactions/... leading up to this error that result in code 404
  2. Followed by this error message:
    • Failed to successfully submit sendRawTransaction for transaction .....

However, the same calls to /transactions/... succeed when tried again several minutes later

Steps to reproduce

make a call to the sendRawTransaction endpoint with a large transaction

curl my-rpc-endpoint -X POST -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0x[LARGE_TRANSACTION]"],"id":1}'

Additional context

Logs - newest to oldest

--------

[2024-10-24 10:12:14.069] ERROR (rpc-server/89 on mainnet-json-rpc-relay-797979dc48-8m8sq): 
[Request ID] Error invoking RPC: timeout exceeded
}
"validNetworkError": false
},
"_code": 21
"status": {
at rejected (/home/node/app/packages/relay/dist/lib/clients/sdkClient.js:25:65)
at Generator.throw (<anonymous>)
at SDKClient.<anonymous> (/home/node/app/packages/relay/dist/lib/clients/sdkClient.js:447:40)

--------

Error: timeout exceeded
"stack":
"message": "timeout exceeded",
"type": "SDKClientError",
err: {
[2024-10-24 10:12:13.069] ERROR (relay-eth/89 on mainnet-json-rpc-relay-797979dc48-8m8sq): 
[Request ID] Failed to successfully submit sendRawTransaction for transaction XXX...YYY...ZZZ
}
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at rejected (/home/node/app/packages/relay/dist/lib/clients/mirrorNodeClient.js:25:65)
at Generator.throw (<anonymous>)
at MirrorNodeClient.<anonymous> (/home/node/app/packages/relay/dist/lib/clients/mirrorNodeClient.js:213:22)
at MirrorNodeClient.handleError (/home/node/app/packages/relay/dist/lib/clients/mirrorNodeClient.js:246:31)

--------

Error: Request failed with status code 404
"stack":
"message": "Request failed with status code 404",
"type": "Error",
err: {
[2024-10-24 10:12:12.069] ERROR (mirror-node/89 on mainnet-json-rpc-relay-797979dc48-8m8sq): 
[Request ID] [GET] transactions/0.0.XXX-YYY-ZZZ?nonce=0 404 status
}
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at rejected (/home/node/app/packages/relay/dist/lib/clients/mirrorNodeClient.js:25:65)
at Generator.throw (<anonymous>)
at MirrorNodeClient.<anonymous> (/home/node/app/packages/relay/dist/lib/clients/mirrorNodeClient.js:213:22)
at MirrorNodeClient.handleError (/home/node/app/packages/relay/dist/lib/clients/mirrorNodeClient.js:246:31)

--------

Error: Request failed with status code 404
"stack":
"message": "Request failed with status code 404",
"type": "Error",
err: {
[2024-10-24 10:12:11.069] ERROR (mirror-node/89 on mainnet-json-rpc-relay-797979dc48-8m8sq): 
[Request ID] [GET] transactions/0.0.XXX-YYY-ZZZ?nonce=0 404 status
}
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at rejected (/home/node/app/packages/relay/dist/lib/clients/mirrorNodeClient.js:25:65)
at Generator.throw (<anonymous>)
at MirrorNodeClient.<anonymous> (/home/node/app/packages/relay/dist/lib/clients/mirrorNodeClient.js:213:22)
at MirrorNodeClient.handleError (/home/node/app/packages/relay/dist/lib/clients/mirrorNodeClient.js:246:31)

--------

Error: Request failed with status code 404
"stack":
"message": "Request failed with status code 404",
"type": "Error",
err: {

[2024-10-24 10:12:10.069] ERROR (mirror-node/89 on mainnet-json-rpc-relay-797979dc48-8m8sq): 
[Request ID] [GET] transactions/0.0.XXX-YYY-ZZZ?nonce=0 404 status

Hedera network

mainnet

Version

v0.56.0

Operating system

Linux

Nana-EC commented 5 days ago

Thanks @thusaras-vc , we're actively looking into this and will update on a direction to improve the experience here