celestiaorg / go-header

Go library with all the services needed to request, sync and store blockchain headers.
Apache License 2.0
19 stars 18 forks source link

Should GetVerifiedRangeByHeight return the first item of the range? #72

Closed oblique closed 11 months ago

oblique commented 1 year ago

The RPC docs of GetVerifiedRangeByHeight state that [from,to) range is returned, however the first item (i.e. from) is not included in the result. My first guess was that this was because we already know it.

Is this a bug in the implementation or in the docs? What is the expected behavior?

vgonkivs commented 1 year ago

hello @oblique. Thanks for posting the issue. Yes, your initial assumption is correct - from should be non-inclusive in case of requesting GetVerifiedRangeByHeight. Will fix this issue in celestia-node documentation.

Wondertan commented 1 year ago

@vgonkivs, should we close this one?

Wondertan commented 11 months ago

cc @vgonkivs, I checked that we haven't fixed it yet