Subscribing to eth events with eth_subscribe stopped working with fromBlock Pending

I can no longer make requests to subscribe to logs with eth_subscribe using Pending as the fromBlock. This was working last week. It works fine if I use Latest as the fromBlock.

Hi @kylezscf and welcome to our Infura community :slight_smile:

Could you please share with me your email address associated with the project and more details about your problem (code snippet/error message you are encountering)?

Hi Flaviu, I’ve written some close to minimal possible code to reproduce:

Theres a comment in there that shows what to change to get it to work. i.e. pending to latest.

@Flaveeu

I’ve also noticed that subscribing to the event stream doesn’t work at all. I get all the events up to BlockNumber::Latest but if more events come in, the stream remains empty, with no errors. I’ve tested this against a local hardhat node and it works fine (as does using BlockNumber::Pending).

I’ve also tried multiple infura endpoints, all have the same problem.

Edit: Also, potentially important info, is this is on the Rinkeby testnet. Subscribing to another contract, say uniswap, the subscription works on Mainnet but not on Rinkeby. The use of BlockNumber::Pending also works on Mainnet, but not Rinkeby.

Edit 2:
Tried using rivet.cloud and it works on both networks.

@Lily @Flaveeu @traian.vila Any insight into this? I would expect this to be higher priority given this is a clear regression, and for quite important methods. Please let me know what the status is. Thanks