db/state: an inverted index missing its first file returns empty ranges below it

Open
#26,423 1 comment 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@AskAlexSharov is already working on this.

Since Nov 17, 2026.

Assessment

This issue has not been assessed yet.

Description

An inverted index missing its first .ef file from disk has a visible list that starts past 0, and IdxRange returns nothing below that start, with no error.

Failing case: logaddrs.0-1.ef is absent while 1-2 and 2-3 are present.

  • iterateRangeOnFiles finds no visible file for [0, 10).
  • recentIterateRange treats the range as frozen, since its end is below files.EndTxNum(), and returns an empty stream; its doc assumes files cover [0, filesEndTxNum).
  • IdxRange for [0, 10) is empty, so log and trace lookups over those blocks answer "no match" instead of failing.

Same on main and with #25965: its leading-coverage cut sees only files present on disk. The values-list case is #26358.

Dominant language
Go
Stars
3.6k
Forks
1.6k
Avg merge
1d 17h
Merged PRs (30d)
820

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from erigontech/erigon

All issues in erigontech/erigon

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.