Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Dec 1, 2023

Conversation

khorolets
Copy link
Member

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:

  • In non-strict mode we don't waste time and don't even attempt to find parent tx hash for the receipt in the DB (slow SELECT-queries make no sense for non-strict mode by slowing it down)
  • The amount of attempts to store ExecutionOutcomes is reduced to 5 to complete in meaningful time (1600 ms or so)
  • Prevent the entire indexer from shutting down if handle_message returns an error. Instead, we display a warning and proceed to the next block.

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)

@morgsmccauley morgsmccauley force-pushed the refactor/improve-non-strict-mode branch from 09371ee to b999547 Compare December 1, 2023 00:58
@morgsmccauley morgsmccauley merged commit d8ee669 into master Dec 1, 2023
2 checks passed
@morgsmccauley morgsmccauley deleted the refactor/improve-non-strict-mode branch December 1, 2023 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants