cl/persistence: RangeBlockRoots returns nil when the cursor Seek or Next fails

Open
#26,304 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@awskii is already working on this.

Since Nov 14, 2026.

Assessment

This issue has not been assessed yet.

Description

  • cl/persistence/beacon_indicies/indicies.go RangeBlockRoots (main 79445646b6e): the for k, v, err := cursor.Seek(...) statement declares a loop-scoped err. The final return err returns the outer one from tx.Cursor, which is nil at that point.
  • A failed Seek or Next ends the loop and the call returns nil, so a caller reads a storage error as "no more roots".
  • Callers on main: the envelope history rebuilder and the execution payload envelopes by-range handler. #26192 adds the capcli blob-store fill successor lookup, where the error becomes an unresolved slot.
  • Fix: declare k, v, err before the loop and assign them in it.
  • Test: a cursor whose Seek fails makes RangeBlockRoots return that error.
  • Found reviewing #26192.
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.