cmd/capcli: chain download fails at start on a Gloas head whose payload is not revealed

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

Maintainers usually reply within 1 day

@awskii is already working on this.

Since Nov 18, 2026.

Assessment

This issue has not been assessed yet.

Description

  • cmd/capcli ChainEndpoint.Run fetches the head's blobs before it commits the head (cmd/capcli/cli.go, head path). A Gloas head has no child yet, so its payload status is unknown and the walk expects the raw commitment count.
  • When the payload is not revealed yet (it is due at half the slot), or the builder withholds it, the endpoint has no blobs and Run fails at start with got 0 of 2. The error reads like an endpoint fault. A rerun after the next block passes. Same on main and after #26506.
  • Proposed fix: with --blobs, do not commit a Gloas head that has commitments. Use it only as the child of its parent and start the walk at head.ParentRoot. A later run fetches the old head with a known child.
  • Traps for that fix:
    • End the head's write tx on the path that does not commit, or the next BeginRw fails with MDBX_BUSY.
    • Gate it on --blobs, or runs without blobs drop the head for nothing.
    • The datadir stays one block behind the head, and the "Starting with" log names a block that is not stored.
    • When the head skipped its parent's payload, the stored tip has commitments, no blobs and no indexed child, so blob-archive-store-check reports it as unresolved until the head's block lands.
  • Rejected: committing the head and skipping its blobs. It reports success over a head whose blobs may be missing, blob-archive-store-check flags every blob-bearing Gloas head as unresolved, and an orphaned head stays canonical at its slot.
  • Found reviewing #26506.
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.