Why does the error "filter not found" appear?
- Filters are isolated to a given blockchain node and not part of the blockchain as such.
Filters are short-lived. A given filter expires if it's not utilized within 5 minutes. You need to make sure that you request eth_getFilterChanges before the filter expires. As long as you periodically poll eth_getFilterChanges within 5 minutes timeframes, the filter will not expire.
- We run an infrastructure of nodes that are handled by clusters for load-balancing purposes. Nodes are dropped from the infra whenever they fall behind the tip within a healthy threshold.
Filters are created in memory of the node you're connected to, so if that node gets dropped, you get reconnected to a different and healthy node which means that the previously created filter will not be available anymore.
Solution :
- Whether the filter expires because of the timeout (or) because of the changes in infrastructure on our end, the solution we propose to our customers is to implement an error handler whenever the error appears. You would have to simply recreate a new filter and move on from there.
- Try if QuickAlerts works for your use-case.
QuickAlerts enables you to leverage real-time blockchain data and advanced alerting to power your apps, make DeFi trading decisions based on the specific data that matters to you, add real-time blockchain event-driven logic into your workflows, and more.
https://www.quicknode.com/docs/quickalerts/getting-started
Comments
0 comments
Article is closed for comments.