IntersectMBO / IntersectMBO/ouroboros-consensus

Clarify the invariants on the range query

Open
#216 0 comments 0 reactions 0 assignees View on GitHub
technical debt UTxO-HD
Dominant language
Haskell
Stars
67
Forks
43
Avg merge
5d 13h
Merged PRs (30d)
43

Description

From the RangeQuery definition:
```
data RangeQuery keys = RangeQuery {
-- | The result of this range query begin at first key that is strictly
-- greater than the greatest key in 'rqPrev'.
--
-- If the given set of keys is 'Just' but contains no keys, then the query
-- will return no results. (This is the steady-state once a looping range
-- query reaches the end of the table.)
rqPrev :: Maybe keys
-- | Roughly how many values to read.
--
-- The query may return a different number of values than this even if it
-- has not reached the last key. The only crucial invariant is that the
-- query only returns an empty map if there are no more keys to read on
-- disk.
--
-- FIXME: can we satisfy this invariant if we read keys from disk but all
-- of them were deleted in the changelog?
, rqCount :: !Int
}
deriving stock (Show, Eq)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.