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

Fix Reverse PoS downloader #4051

Closed
wants to merge 1 commit into from
Closed

Fix Reverse PoS downloader #4051

wants to merge 1 commit into from

Conversation

Giulio2002
Copy link
Contributor

No description provided.

if len(segment) == 0 {
return nil
func (hd *HeaderDownload) ProcessSegmentPOS(segment ChainSegment, tx kv.Getter, peerId [64]byte) ([]PenaltyItem, error) {
// segment of one header are usually remainder of gossip, but the peer can still be valid.
Copy link
Member

Choose a reason for hiding this comment

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

Can you give an example when it happens? I'm a bit sceptical that we need this special check.

return err
}
// We prevent pos reverse downloading from happening concurrently with an interrupted sync.
if s.BlockNumber > executionProgress {
Copy link
Member

Choose a reason for hiding this comment

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

Hmm. Not sure about this. In the PoW case we don't wait for execution to finish but rather download new headers first, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is less code changes, i dont think it makes too much of a difference.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we would have to pass the headerdownload to all other stages, for now i would reduce this PR only to this change, if you are okay with it

@Giulio2002 Giulio2002 closed this May 20, 2022
@AskAlexSharov AskAlexSharov deleted the fix-stagedsync branch November 30, 2023 01:53
@VBulikov VBulikov mentioned this pull request Feb 5, 2025
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.

2 participants