celestiaorg / celestiaorg/go-header
improvement(sync): Consider removing dependency on `syncedHead` field in Syncer
- Dominant language
- Go
- Stars
- 21
- Forks
- 33
- Avg merge
- 5d 20h
- Merged PRs (30d)
- 7
Description
Some time ago we had an issue in syncer, where `Head` was returning an incorrect header during store updating. We extended Syncer with the additional param `syncHead` to fix this issue. But the `writeHead` field inside the store does the same - it immediately stores the latest head during appending. The idea is to have an access to this field from syncer and simplify its implementation.
Contributor guide
Research direction
Start by tracing the Syncer, its syncedHead and syncHead parameters, and the store's writeHead field to understand how heads are updated during appending. Determine whether the store's latest head can be accessed from Syncer without the extra dependency, then verify that header retrieval remains correct while the Syncer implementation is simplified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100