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/downloader: ignore zero size header batch for importing #24569

Merged
merged 2 commits into from
Mar 22, 2022

Conversation

rjl493456442
Copy link
Member

@rjl493456442 rjl493456442 commented Mar 22, 2022

This PR fixes a panic by importing zero size header batch. It can happen when the imported headers are crossing the ttd border and all the synced headers are post-merge.

Copy link
Member

@MariusVanDerWijden MariusVanDerWijden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but we might want to also add an early return in ValidateHeaderChain. If chain is empty, return an error

@holiman holiman added this to the 1.10.17 milestone Mar 22, 2022
@holiman
Copy link
Contributor

holiman commented Mar 22, 2022

TestSkeletonSyncRetrievals suffers from a spurious timing issue, and sometimes fails on appveyor.

@holiman holiman merged commit e0e8bf3 into ethereum:master Mar 22, 2022
sidhujag pushed a commit to syscoin/go-ethereum that referenced this pull request Mar 23, 2022
…#24569)

* eth/downloader: ignore zero size header batch for importing

* core, light: reject empty header batch for importing
JacekGlen pushed a commit to JacekGlen/go-ethereum that referenced this pull request May 26, 2022
…#24569)

* eth/downloader: ignore zero size header batch for importing

* core, light: reject empty header batch for importing
maoueh pushed a commit to streamingfast/go-ethereum that referenced this pull request Sep 30, 2022
…#24569)

* eth/downloader: ignore zero size header batch for importing

* core, light: reject empty header batch for importing
cp-wjhan pushed a commit to cp-yoonjin/go-wemix that referenced this pull request Nov 16, 2022
…#24569)

* eth/downloader: ignore zero size header batch for importing

* core, light: reject empty header batch for importing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants