db/state: startup skips a covered accessor whose covering files are not visible

Open
#26,416 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

BuildMissedAccessors with kv.SkipCoveredAccessors skips a file whose range is covered by smaller files that have accessors (dropCovered → dropCoveredAccessors). The coverage test ignores visibility: the smaller files can be hidden by calcVisibleFiles because their commitment ranges are gone.

  • accounts 0-1, 1-2, 0-2 on disk; commitment only 0-2; accounts.0-2.bt missing
  • startup skips building 0-2.bt as covered
  • 0-1 and 1-2 are not visible (no matching commitment), 0-2 is not visible (no accessor)
  • with accounts pruned past step 0, the files/DB gap check exits on every start and the accessor is never rebuilt

Coverage should be decided by the files that can become visible, not by every dirty file.

Found while reviewing #26386, which reuses the same coverage filter in hasAccessorsToBuild.

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.