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

Continue updating the header head during state sync #1174

Open
SkidanovAlex opened this issue Aug 15, 2019 · 4 comments
Open

Continue updating the header head during state sync #1174

SkidanovAlex opened this issue Aug 15, 2019 · 4 comments
Assignees
Labels
A-chain Area: Chain, client & related C-enhancement Category: An issue proposing an enhancement or a PR with one. T-core Team: issues relevant to the core team

Comments

@SkidanovAlex
Copy link
Collaborator

SkidanovAlex commented Aug 15, 2019

Currently during fast sync we do not move header head.

The reason for that appears to be due to implementation details, specifically HeaderSync and StateSync are two mutually exclusive modes of operation. It seems like nothing would break if we sync headers while syncing state, just need to refactor code to support it.

We need to continue updating the header head, because if the header head runs two epochs from the state sync head, we don't have a reliable way of determining peers that can serve state to do the state sync, and the state sync can stall.

Once implemented, test that the logic in the client.rs that restarts the state sync once the header head is two epochs ahead actually works.

SkidanovAlex added a commit that referenced this issue Aug 15, 2019
State sync was downloading the block at `sync_hash`, but actually needs to download the previous block.
Generally nothing was breaking with downloading at `sync_hash` except that if the next block for some reason cannot be applied or is not known yet, for a while `body_head` was pointing at the non-existing block (specifically the prev of `sync_hash`).

Also added logic to reset the state sync if the header head is two epochs ahead, but this logic doesn't trigger currently because we do not move the header head during state sync. Tracking in #1174
@ilblackdragon ilblackdragon added the A-chain Area: Chain, client & related label Nov 29, 2019
@ilblackdragon ilblackdragon added this to the MainNet milestone Dec 8, 2019
@ilblackdragon ilblackdragon removed this from the MainNet milestone Mar 20, 2020
@stale
Copy link

stale bot commented Jul 1, 2021

This issue has been automatically marked as stale because it has not had recent activity in the last 2 months.
It will be closed in 7 days if no further activity occurs.
Thank you for your contributions.

@stale stale bot added the S-stale label Jul 1, 2021
@bowenwang1996 bowenwang1996 added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jul 2, 2021
@stale stale bot removed the S-stale label Jul 2, 2021
@bowenwang1996 bowenwang1996 added the T-core Team: issues relevant to the core team label Jul 2, 2021
@stale
Copy link

stale bot commented Sep 30, 2021

This issue has been automatically marked as stale because it has not had recent activity in the last 2 months.
It will be closed in 7 days if no further activity occurs.
Thank you for your contributions.

@stale stale bot added the S-stale label Sep 30, 2021
@stale
Copy link

stale bot commented Dec 29, 2021

This issue has been automatically marked as stale because it has not had recent activity in the last 2 months.
It will be closed in 7 days if no further activity occurs.
Thank you for your contributions.

@stale stale bot added the S-stale label Dec 29, 2021
@stale
Copy link

stale bot commented Mar 31, 2022

This issue has been automatically marked as stale because it has not had recent activity in the last 2 months.
It will be closed in 7 days if no further activity occurs.
Thank you for your contributions.

@stale stale bot added the S-stale label Mar 31, 2022
@akhi3030 akhi3030 removed the S-stale label Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-chain Area: Chain, client & related C-enhancement Category: An issue proposing an enhancement or a PR with one. T-core Team: issues relevant to the core team
Projects
None yet
Development

No branches or pull requests

4 participants