You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As we are removing the adequateHeight sanity check for the sync target since it is based on a parameter that may become variable in the future, we should introduce additional light-weight sync target verification. This comes in the form of skipping verification.
Description
Skipping verification will allow go-header to verify a recent network head (either inbound from headersub or served by the p2p.Exchange) against a subjective head that is non-adjacent. We already have non-adjacent header verification but skipping verification via bifurcated header sync.
Bifurcated header sync just means that if a sync target cannot be verified non-adjacently against a subjective head due to lack of sufficient validator set overlap, then the halfway point between those two headers should be downloaded and attempted.
For example:
Subjective head is 500, network head is 1000. Header at height 1000 does not have sufficient validator set overlap, so the client downloads height 750 (which does have enough sufficient overlap), verifies it against 500 and advances the subjective head to 750. Client tries to apply height 1000 against 750 and if there is sufficient overlap, it applies 1000 as the subjective head. If not, it downloads the halfway point and retries the process.
Please keep in mind, for the first iteration, it is okay not to cache the downloaded blocks if they cannot be applied -- we can redownload them via the p2p.Exchange once the sync target is set as it will be initially complicated for the syncer to use that cache to fill out gaps in sync ranges.
For later iterations, a cache for this bifurcation process would reduce the need to do redundant requests for the same information from the network.
TODO
The text was updated successfully, but these errors were encountered: