Issue with CloudFlare Ethereum Gateway "header not found"

I don’t know where to report an issue with your Web3 API service. So I’m opening a topic here.

When using the Web3 CloudFlare service with a desktop wallet, about 1 getBalance request over 60 is replying with a server internal error, when validating the query input : “header not found”. The getBalance interval period is about 10 seconds.
It is like the “latest” block identifier is not working sometimes.

Here’s a log of a failed query.
Sending HTTP POST data :
Connecting to HTTPS Host: Port: 443
Socket connected
Connected to HTTPS PathTarget=/
Sending data time :
2021-10-19 12:01:15.449241 GMT
Sending HTTP POST data :
POST / HTTP/1.1\r\nHost:\r\nUser-Agent: Uniblow/1\r\nConnection: close\r\nContent-Type: application/json\r\nContent-Length: 116\r\n\r\n{"jsonrpc":"2.0","id":18,"method":"eth_getBalance","params":["0x4115e09e997b90DBD8AC90C4b5Fe1E391F60A494","latest"]}

Reading socket data
Get Messages : Response(status_code=200, headers=<Headers([(b'date', b'Tue, 19 Oct 2021 12:01:17 GMT'), (b'content-type', b'application/json'), (b'content-length', b'78'), (b'connection', b'close'), (b'access-control-allow-origin', b'*'), (b'access-control-allow-headers', b'Content-Type'), (b'access-control-allow-methods', b'POST, OPTIONS'), (b'expect-ct', b'max-age=604800, report-uri=""'), (b'server', b'cloudflare'), (b'cf-ray', b'6a09d9d2e971cda7-CDG')])>, http_version=b'1.1', reason=b'OK')
Get Data
{"jsonrpc":"2.0","id":18,"error":{"code":-32000,"message":"header not found"}}
Received data time (read from socket):
2021-10-19 12:01:15.694846 GMT.
My computer local time is off (late) by ~2s.

This issue was present also in the Metamask RPC, and sometimes in the Infura service. Our test today with Infura shows their service is not affected as CloudFlare.

As a side note, some RPC services are also affected when the block number is set to “pending”, and the server replies the error “missing trie node”.

Hi @antoine.ferron,

Thanks for the detailed report.
This is an issue that seems to appear on certain calls indeed. We are currently investigating it.