-
Notifications
You must be signed in to change notification settings - Fork 980
Description
Description
It is desirable to avoid long syncs by simply supplying a trusted finalised state and starting lighthouse from this point.
Some of the issues needed to support this are:
-
Handling block history - A LH node that starts at an arbitrary point does not have the block history and cannot respond correctly to it's peers requests who wish to sync from points before that arbitrary start. The spec indicates that we must maintain blocks from the most recent weak subjectivity point or in the case of long periods of non finality
min(finalized_epoch, weak_subjectivity_point).
One solution is to attempt to download blocks backwards, however this runs into issues with block verification (in its current form) as we cannot verify blocks in a "backwards fashion". A somewhat cleaner solution would be to only allow LH to start from weak subjectivity points which allows us to maintain our sync logic and sync forward to the current head. The drawback here is if the weak subjectivity period is the order of months, we must spend the time to sync and verify all the blocks to the current head. -
Handling peers in sync that only partially support the full history - We need to enhance a peer handling in sync to support peers with only partial views of the chain. I'll make a separate issue for this once we have decided on how peers will identify themselves as having a partial view of the block history.