near / nearcore

Reference client for NEAR Protocol
https://near.org
GNU General Public License v3.0
2.31k stars 618 forks source link

Continue updating the header head during state sync #1174

Open SkidanovAlex opened 5 years ago

SkidanovAlex commented 5 years ago

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.

stale[bot] commented 3 years ago

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[bot] commented 2 years ago

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[bot] commented 2 years ago

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[bot] commented 2 years ago

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.