The "filter not found" error typically occurs when a filter that was created to track events in a blockchain node has expired or is not available due to changes in the infrastructure on our end.
It's important to note that filters are short-lived and isolated to a specific blockchain node. If the filter is not utilized within 5-minute, it will expire.
- To prevent this, you should periodically poll eth_getFilterChanges within 5-minute timeframes.
At Chainstack, we use a cluster-based infrastructure for load balancing purposes on our Elastic Nodes. Nodes are excluded from the infrastructure whenever they fall behind the tip within a healthy threshold. If the node you are connected to gets dropped, you will be reconnected to a different and healthy node, which means that the previously created filter will not be available anymore.
To resolve the "filter not found" error:
We recommend implementing an error handler to recreate a new filter whenever the error appears. This will ensure that you can continue tracking events in the blockchain without interruption.
If you need further assistance, please feel free to contact our support team by opening a support ticket.