-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
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. |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
No description provided.