ergoplatform / ergoplatform/explorer-backend
different response for each instance of explorer
- Dominant language
- Scala
- Stars
- 23
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
We found a bug in explorer APIs which seems to be related to data storage and sorting.
We have an address that we know the related boxes are not currently in use and [this query](https://api.ergoplatform.com/api/v1/boxes/unspent/byAddress/2DxRv75maq3FewTq4mCgRzJPaGfyyWsaJkBQ1syuTg1XZg9avspmm9c6nMVn2ix7WMEq7xZ6QUczkEN8rJFEiY7eG7vP7zg4YC53UKLdHLRnEQfx2Nb3A2iBq4AN216eMcxVEzeqDqenSRd3bjnJVXsJp8SeynUSnk5brnsD2rrjsQTQzwAZi57xQn3a93Gsqt8mDmauRhixCsPGHV4Fqv3hq?sortDirection=desc&offset=10&limit=10) result should be stable. But querying multiple times results in different outputs (different box sorting and box selection)
We don't know the reason creating such a problem but it might be related to multiple instances behind the explorer APIs and their difference on data sorting.
We supposed that if we iterate on paging of this address we can iterate on all boxes. But as a result of this bug, sometimes we saw some boxes twice and couldn't find the desired box.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by repeating the linked /api/v1/boxes/unspent/byAddress query with its sortDirection, offset, and limit parameters, then compare results across requests and pages. Trace the explorer API's data storage and sorting path; done means stable ordering and box selection, with no duplicates or missing boxes while iterating through pages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100