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

Handle pre & headers sync states, add header verification to Block Clock verification progress #277

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jarolrod
Copy link
Member

@jarolrod jarolrod commented Feb 28, 2023

This connects us to the header tip signal so that we can handle when the node is in pre & or headers sync. This calculates the progress of the pre or headers sync and adds it to our verification progress. Pre and headers sync take up 1% of verification progress each, then IBD begins at 2% progress as displayed on the block clock.

Windows
Intel macOS
Apple Silicon macOS
ARM64 Android

@jarolrod
Copy link
Member Author

jarolrod commented Mar 1, 2023

Updated from ea58e24 to 6bfccd9, compare

Changes:

  • fix verification progress update math so that it doesn't go to 102 (verification progress + header progress) and now finishes at 100
  • Change how we consider to be synced within the block clock's perspective from a check on if verificationProgress is large enough to a query on the node to see if it is in ibd or not. This fixes the issue described here. The issue there is that we'd get some header and that would create a certain progress, and because the check for synced was that verification progress needs to be higher than 99, the UI would get stuck in a weird spot.

@johnny9
Copy link
Contributor

johnny9 commented Mar 2, 2023

Concept ACK

Copy link
Contributor

@johnny9 johnny9 left a comment

Choose a reason for hiding this comment

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

Will need a rebase with the previous PR but the update to synced is great and I don't see the issue with the BlockClock going into the wrong state anymore.

@jarolrod
Copy link
Member Author

jarolrod commented Mar 2, 2023

need to rework, the call to isInIBD makes the UI lock up

@jarolrod jarolrod marked this pull request as draft March 2, 2023 06:11
This connects us to the header tip signal so that we can handle when the
node is in pre & or headers sync. This calculates the progress of the
pre or headers sync and adds it to our verification progress. Pre and 
headers sync take up 1% of verification progress each, then IBD begins
at 2% progress as displayed on the block clock.
This changes when we consider to be synced within the block clock's
perspective from a check on if verificationProgress is large enough to
a query on the node to see if it is in ibd or not
@jarolrod
Copy link
Member Author

jarolrod commented Sep 1, 2023

rebased over main

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