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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

minh-bq
Copy link
Contributor

@minh-bq minh-bq commented Nov 20, 2024

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.

@minh-bq
Copy link
Contributor Author

minh-bq commented Nov 20, 2024

In go-ethereum, since the block announcement is in the consensus engine after the merge, the block fetcher logic is removed already (ethereum/go-ethereum#29169).

@minh-bq minh-bq marked this pull request as draft November 20, 2024 07:40
@minh-bq minh-bq force-pushed the fix/block-fetcher branch 2 times, most recently from 18066a3 to 070729b Compare November 21, 2024 06:34
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.
@minh-bq minh-bq marked this pull request as ready for review November 21, 2024 09:04
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