-
Notifications
You must be signed in to change notification settings - Fork 63
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
SpvClient loses the connection chain and stops providing blocks #223
Comments
Are there any existing error-handling mechanisms in place within the SpvClient or related components to handle scenarios where blocks are not delivered due to pruning? |
They don't consider it errors per se, but they do report it back to the caller with the boolean in |
If the boolean value indicates that blocks were disconnected, can we retry an attempt to fetch and connect the missing the blocks again? |
The expected action here is blocks getting connected or disconnected. If one of these things happen the boolean should be |
We may be able to fix this by checking whether we are in IBD or not. We could either deny running if that is the case or wait until the backend catches up. This is reported by |
Here's a PoC for this: https://github.com/sr-gi/rust-teos/tree/ibd-abort. @mariocynicys if you still have a copy of the chain that was triggering this error, would you mind testing it out (assuming you're ok with the approach)? |
This is a hard to produce issue but basically what happens is that bitcoind prunes old block which aren't yet delivered to the tower. Thus the tower stops connecting blocks (watching).
Repro:
What will happen:
At this point
spv_client.poll_best_tip
will stop connecting blocks (blocks are connected sequentially, if one is missing we can't connect later ones), which is indicated by the boolean returned.The tower will not get any blocks after this point nor will it report errors.
Such an issue could be triggered with the loss of internet connection of some long time. So it might be worth resolving it automatically and not requiring manual interference.
The text was updated successfully, but these errors were encountered: