near / near-indexer-for-explorer

Watch NEAR network and store all the data from NEAR blockchain to PostgreSQL database
https://near-indexers.io/docs/projects/near-indexer-for-explorer
GNU General Public License v3.0
123 stars 56 forks source link

refactor: Improve non-strict-mode to make it even less strict #387

Closed khorolets closed 7 months ago

khorolets commented 7 months ago

During our last refactoring sessions, we haven't paid enough attention to the non-strict mode for a while. Thus, this mode lost its nature and became too strict for its name.

In this PR I've improved this mode to help us to get back on track:

I've made a local check with an empty database setup and run an indexer with non-strict-mode + from-latest on the main net. In around 100 (or so) blocks, my indexer started writing new data to the database without massive retries. (I want to emphasize that some of the data wasn't stored as designed for non-strict-mode)