`block_info.status` column has duplicate status for the same block
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 173
- PR merge metrics
- No merged PRs in 30d
Description
At seemingly random times the `block_info.status` column in `block_index.sqlite` database will have two rows for a single block and both of the statuses for those blocks will be the same:
```
sqlite> select height, datapos, txcount, status, time from block_info where height=790100;
790100|96572990|79|157|1593605718
790100|96656496|108|157|1593605750
```
Contributor guide
Research direction
Start by reproducing the duplicate-row query against block_index.sqlite, using the block_info table and the height=790100 example shown in the report. Trace the code that inserts or updates block_info entries and determine why one block can receive two identical statuses; done means the cause is fixed and duplicate rows no longer occur under the same conditions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, sqlite
- Domain
- blockchain, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100