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

Don't allow the service to miss blocks #1150

Closed
ra0x3 opened this issue Jul 27, 2023 · 3 comments · Fixed by #1349
Closed

Don't allow the service to miss blocks #1150

ra0x3 opened this issue Jul 27, 2023 · 3 comments · Fixed by #1349
Assignees
Labels
fuel-explorer This PR is directly related to the block explorer P: High

Comments

@ra0x3
Copy link
Contributor

ra0x3 commented Jul 27, 2023

  • Using the explorer dashboard I can see we're missing a few block when indexing for the explorer
  • Obviously the explorer should not be missing any blocks
  • However, it's also safe to assume we're going to have some 0.01% margin of error
  • We need to define some way to index the blocks we missed

Additional context

  • The quick win here is probably to just create a solution for the explorer only
    • The better/longer solution would be to define a solution that will work for any indexer
@ra0x3 ra0x3 added P: Medium fuel-explorer This PR is directly related to the block explorer labels Jul 27, 2023
@ra0x3
Copy link
Contributor Author

ra0x3 commented Jul 27, 2023

Comment to keep in mind

@ra0x3 ra0x3 changed the title Define some way to index missing blocks Don't allow the service to miss blocks Aug 1, 2023
@ra0x3
Copy link
Contributor Author

ra0x3 commented Aug 1, 2023

  • Indexing blocks should always be sequential - Block(1), Block(2), Block(3), ... Block(n)
  • If the indexer is ever at a state where $LAST_INDEXED_BLOCK_HEIGHT - $CURRENT_BLOCK_HEIGHT != 1 the the service should pause/wait until the issue is remediated
  • The service should not continue to index blocks if things are out of order
  • I.e., we should detect whether we are $IN_SYNC or $OUT_OF_SYNC before even calling handle_event in the executor
  • How TheGraph allows indexers to opt-in to this (somewhat similar)
    • syncrhonize: true/false (or something similar) might be a good config option to add to the manifest

@ra0x3 ra0x3 added P: High and removed P: Medium labels Aug 1, 2023
@ra0x3 ra0x3 self-assigned this Aug 2, 2023
@ra0x3 ra0x3 linked a pull request Aug 2, 2023 that will close this issue
7 tasks
@ra0x3 ra0x3 removed their assignment Aug 3, 2023
@ra0x3 ra0x3 mentioned this issue Aug 8, 2023
@ra0x3 ra0x3 self-assigned this Aug 9, 2023
@ra0x3 ra0x3 linked a pull request Aug 9, 2023 that will close this issue
7 tasks
@ra0x3 ra0x3 removed their assignment Aug 16, 2023
@ra0x3 ra0x3 mentioned this issue Aug 16, 2023
9 tasks
@ra0x3
Copy link
Contributor Author

ra0x3 commented Aug 16, 2023

  • Just an FYI here that we are most likely going to have to devise a mechanism to allow the fuel-indexer (the service) to store blocks, outside of the context of any individual indexer
  • We will use this cache of blocks in order to determine whether any given indexer is in or out of sync
  • We have to store this cache of blocks on the service level, because Blocks and Transactions are not required for indexers
  • This ☝🏽 is slightly related to feature: internal block store for backfilling newly-deployed indexers #990, just without the concept of migrating/backfilling (although those would side benefits we'd get for free)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fuel-explorer This PR is directly related to the block explorer P: High
Projects
None yet
2 participants