Skip to content

sync: Subjective Tail #258

@Wondertan

Description

@Wondertan

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions