celestiaorg / celestiaorg/go-header
header: standartise `Getter` interface method _blocking_
- Dominant language
- Go
- Stars
- 21
- Forks
- 33
- Avg merge
- 5d 20h
- Merged PRs (30d)
- 7
Description
Store implementation of Getter.GetByHeight blocks until the block are available. However, there are cases where blocking is not needed, and Store should just report `ErrNotFound` instead. This problem boils down to undefined blocking properties of `Getter`
From one POV it's fine to have implementation-specific blocking capabilities, while on the other hand making blocking configurable makes things more explicit. Like the` Getter` interface could rcv options like `Wait(true)`, which would make the current behavior of the `Store` explicit. This could also work for HeaderEx implementation of the Getter and others.
Contributor guide
Research direction
Start with the Getter interface and its GetByHeight behavior, then compare the Store and HeaderEx implementations mentioned in the issue. Clarify whether blocking should remain implementation-specific or become configurable, including when Store returns ErrNotFound. Done means the interface has an agreed blocking contract and the affected implementations follow it consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend-api-design
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100