-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Labels
Description
Currently Syncer does subjective initialization with Head, instead perform it with Tail. The Tail is estimated with the following.
func estimateTail(head, tail Header, blockTime, window time.Duration)
(height uint64) {
estimatedRange = (now + window - tail.Time()) / blockTime
estimatedCutoffHeight = min(tail.Height() + estimatedRange, head.Height())
return estimatedCutoffHeight
}The Tail height should be estimated using TrustingPeriod as window. The Tail header has to be requested from Exchange using GetByHeight and then Appended to Store as the first header. Therefore, this is blocked on #243.