Skip to content

eth/fetcher: don't skip block/header when parent is not found#5

Open
minh-bq wants to merge 1 commit intoronin-chain:masterfrom
minh-bq:fix/block-fetcher
Open

eth/fetcher: don't skip block/header when parent is not found#5
minh-bq wants to merge 1 commit intoronin-chain:masterfrom
minh-bq:fix/block-fetcher

Conversation

@minh-bq
Copy link
Contributor

@minh-bq minh-bq commented Feb 18, 2025

Currently, we simply skip importing block/header when parent block/header is not found. However, since multiple blocks can be imported in parallel, the not found parent might be due to the fact that the parent import does not finish yet. This leads to a suitation that the correct block in canonical chain is skipped and the node gets stuck until the peer timeout. We observe this behavior when there are reorgs and block import is time consuming.

This commit fixes it by creating a new queue for those missing parent blocks and re-import them after the parent is imported.

Currently, we simply skip importing block/header when parent block/header is not
found. However, since multiple blocks can be imported in parallel, the not
found parent might be due to the fact that the parent import does not finish
yet. This leads to a suitation that the correct block in canonical chain is
skipped and the node gets stuck until the peer timeout. We observe this behavior
when there are reorgs and block import is time consuming.

This commit fixes it by creating a new queue for those missing parent blocks and
re-import them after the parent is imported.
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.

1 participant