Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow starting syncer with head that is not recent #85

Closed
gupadhyaya opened this issue Jul 14, 2023 · 2 comments · Fixed by #87
Closed

Allow starting syncer with head that is not recent #85

gupadhyaya opened this issue Jul 14, 2023 · 2 comments · Fixed by #87
Assignees
Labels
enhancement New feature or request

Comments

@gupadhyaya
Copy link
Contributor

gupadhyaya commented Jul 14, 2023

In case of single node (sequencer) with very short blocktime, after the genesis block is published, it tries to start the syncer, but fails to use the latest head as it is not recent enough (https://github.com/celestiaorg/go-header/blob/main/sync/sync_head.go#L24). It cannot fetch from the network as there are no peers. In this situation, can we allow starting syncer with not recent enough head?

This scenario is happening in rollkit with sub-second blocktime, where looks like the time between the genesis block timestamp and when the node tries to start the syncer is larger than blocktime*blocktime/2 as allowed in isRecent.

@Wondertan
Copy link
Member

Wondertan commented Jul 14, 2023

If we fail to fetch getter.Head, we can return s.subjectiveHead, while logging out the error.

This will solve your problem and I can definitely say that's a nice improvement to the syncer, I. E. syncer continues functioning even when exchange fails. This is fine as long as our subjective is not expired.

@renaynay
Copy link
Member

also good w me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants