EOSIO Search Rangesstable
This page gives information about the searched range for various combinations of
highBlockNum when using our search engine as well as the implications of using a Cursor or deciding
about the sort order, either ascending (i.e. forward) or descending (i.e. backward).
To complicate things a bit more, the actual resolution is different between a search query versus a search subscription (i.e. streaming).
You will notice that not all possible combinations are displayed here, mainly because the matrix
of all combinations is too big for quick understanding of boundaries resolution. We put the most
important cases, the resolution for all other combinations can be inferred easily based on
the table below. For example, values
lowBlockNum: -50, highBlockNum: -1 would mean the range
[HEAD - 50, HEAD] so the last 50 blocks of the chain at time of query.
NoteAll the boundaries are inclusive, so a range
[HEAD, HEAD]will only check a single block, the
WarningNot all combinations are valid, trying to query an upper boundary that is below boundary yields an invalid range error, for example trying
lowBlockNum: -1, highBlockNum: -50is doomed to failed as it would always resolves to
[HEAD, HEAD - 50]which means the upper boundary is below the lower one.
In the tables that follow, we use a few semantics to make the table easier to read:
- The value
Nonemeans the field was not present at all
Crepresents the block number encoded in the cursor
Lrepresents a dynamic value passed in
lowBlockNumfield, could be positive or negative
Hrepresents a dynamic value passed in
highBlockNumfield, could be positive or negative
- Special variable
HEADmeans the head block of the chain, as seen by our search engine