[Node Operator Question] Unexpected "parse error" from Proxyd for valid request #25
-
Issue DescriptionWe are attempting to run Proxyd as a load balancer for RPC nodes as part of our open source project. Proxyd curl -i -X POST -H 'X-Forwarded-For: 127.0.0.1' -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"data":"0xd8dfeb45","gas":"0x2faf080","to":"0xac957cddc645b791e3d0e34ffb29d87642c7ebb4"},{"blockHash":"0x17db678f3f91edbeb885cbd18069d029915a4f9fc3b880eecaad625dc3b2c801"}],"id":36318}' proxyd:8545
HTTP/1.1 400 Bad Request
Content-Type: application/json
Vary: Origin
X-Proxyd-Cache-Status: MISS
Date: Fri, 27 Oct 2023 17:20:07 GMT
Content-Length: 77
{"jsonrpc":"2.0","error":{"code":-32700,"message":"parse error"},"id":36318} However this request is successful directly against a node: curl -i -X POST -H 'X-Forwarded-For: 127.0.0.1' -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"data":"0xd8dfeb45","gas":"0x2faf080","to":"0xac957cddc645b791e3d0e34ffb29d87642c7ebb4"},{"blockHash":"0x17db678f3f91edbeb885cbd18069d029915a4f9fc3b880eecaad625dc3b2c801"}],"id":36318}' erigon-1-stateful-node:8545
HTTP/1.1 200 OK
Content-Type: application/json
Vary: Origin
Date: Fri, 27 Oct 2023 17:19:43 GMT
Content-Length: 107
{"jsonrpc":"2.0","id":36318,"result":"0x0000000000000000000000007da96a3891add058ada2e826306d812c638d87a7"} The problem may be related to tag rewriting, as when removing the Node LogsNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
eth_call parameter 1 (starting at index 0) should be a string and not a map I think your request was supposed to be
as for the different error message, you are right - proxyd tag rewrite can't parse this request as it is expecting a string.. so the request is rejected before it get sent to the backend |
Beta Was this translation helpful? Give feedback.
-
Thank you for the quick response @felipe-op! The |
Beta Was this translation helpful? Give feedback.
Thank you, @chriswessels - I wasn't aware of this spec, but confirmed it is used by geth client.
I'll open an internal issue so we can add support to this format as well.