You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In dc-sync, we use a oneshot channel as a signal to start the pending block fetch/apply task once the tip of the blockchain has been reached.
The problem with that is that the pending block may end up being applied to the db before the channels have their blocks all applied: this may result in the node being in an inconsistent state where the parent_block_hash of the pending block does not match the block at tag latest.
This was found in #232 as we are now checking parent block hashes there.
Steps to reproduce
No response
The text was updated successfully, but these errors were encountered:
I expect this to be fixed with the block import pipeline refactor coming before p2p, unless we really need to fix it before that.
antiyro
changed the title
Pending block may be fetched and applied before importing the previous block it is on
bug(sync): Pending block may be fetched and applied before importing the previous block it is on
Sep 25, 2024
Is there an existing issue?
Description of bug
In dc-sync, we use a oneshot channel as a signal to start the pending block fetch/apply task once the tip of the blockchain has been reached.
The problem with that is that the pending block may end up being applied to the db before the channels have their blocks all applied: this may result in the node being in an inconsistent state where the parent_block_hash of the pending block does not match the block at tag latest.
This was found in #232 as we are now checking parent block hashes there.
Steps to reproduce
No response
The text was updated successfully, but these errors were encountered: