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

improve startup process to avoid missing blocks #454

Closed
MicaiahReid opened this issue Oct 17, 2023 · 1 comment
Closed

improve startup process to avoid missing blocks #454

MicaiahReid opened this issue Oct 17, 2023 · 1 comment
Assignees

Comments

@MicaiahReid
Copy link
Contributor

Currently, when chainhook starts up, all blocks between the ingested archive's last block and chain tip are missing. We need to fetch these blocks and add them to the local chain state so there aren't gaps.

@github-project-automation github-project-automation bot moved this to 🆕 New in DevTools Oct 17, 2023
@andresgalante andresgalante moved this from 🆕 New to 📋 Backlog in DevTools Nov 6, 2023
@MicaiahReid MicaiahReid self-assigned this Jan 29, 2024
@MicaiahReid MicaiahReid moved this from 📋 Backlog to 🏗 In Progress in DevTools Jan 29, 2024
@MicaiahReid
Copy link
Contributor Author

MicaiahReid commented Feb 1, 2024

So a stacks node will stop progressing until Chainhook is back up, so if Chainhook goes down there shouldn't be any gaps in the blocks.

From my investigations, I think these gaps are happening during a reorg where:

  • chainhook crashes (maybe, it could just be untimely restarts)
  • chainhook restarts and receives blocks that were missed
  • those blocks contain some re-org blocks
  • Chainhook doesn't have any blocks queued up in its fork indexer, so it can't correctly determine which is canonical
  • So Chainhook fails to process incoming blocks, but the stacks node is successfully able to emit the blocks, so now we've lost our store of what happened while chainhook was down

All that to say, #487 is a more appropriate issue to resolve the problems we're seeing. Closing this ticket in favor of that one.

@MicaiahReid MicaiahReid closed this as not planned Won't fix, can't repro, duplicate, stale Feb 1, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In Progress to ✅ Done in DevTools Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

1 participant