eth_getLogs is returning empty array since Jan 5

My dApp makes calls to eth_getLogs using web3 like so:

var logEntries = await web3.eth.getPastLogs({
   fromBlock: startBlock,
   toBlock: startBlock + 100,
   topics: [SOME_TOPIC, null],

I typically only request a scan of the most recent 100 blocks, so result sets are normally quite small. It’s not actually a very important part of my dApp (lol) and I haven’t been monitoring it regularly, but I just noticed for the last month (since Jan 5), it has been returning an empty array. I switched my web3 provider to a local light client that I am running, and immediately it began working as I expected.

Any known issues on Infura?

Hi Russ sorry to hear you’re running into issues. Can you share the full code snippet so we can try to reproduce the error? Which network are you testing against? Feel free to DM me the details if you don’t want to share the data publicly.

Problem solved … it was my code [oops] :blush:

1 Like