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

Faster header sync for ProgPoW #1133

Merged
merged 2 commits into from
Feb 1, 2022
Merged

Faster header sync for ProgPoW #1133

merged 2 commits into from
Feb 1, 2022

Conversation

psolstice
Copy link
Contributor

PR intention

Header sync seemed to be very slow for ProgPoW. This PR fixes it.

Code changes brief

There are two functions for checking PP hash: GetProgPowHashFull and GetProgPowHashLight. The former does proper check but is relatively slow. The latter doesn't check everything and fast. This PR uses light function during CheckBlockHeader() call and postpones full check until call to ConnectBlock(). This doesn't make the sync process any faster but it makes "syncing headers" stage of full sync take less time.

Copy link
Contributor

@levonpetrosyan93 levonpetrosyan93 left a comment

Choose a reason for hiding this comment

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

LGTM

@reubenyap reubenyap merged commit a533ec5 into master Feb 1, 2022
@reubenyap reubenyap deleted the header-sync branch February 1, 2022 10:01
levonpetrosyan93 pushed a commit that referenced this pull request May 17, 2023
* Faster header sync for ProgPoW

* ProgPow test fix
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.

3 participants